Skip to content

Commit e572fae

Browse files
Introduce purs-tidy formatter (#21)
* Add purs-tidy formatter * Run purs-tidy
1 parent b3ca254 commit e572fae

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515

1616
- name: Set up a PureScript toolchain
1717
uses: purescript-contrib/setup-purescript@main
18+
with:
19+
purs-tidy: "latest"
1820

1921
- name: Cache PureScript dependencies
2022
uses: actions/cache@v2
@@ -29,3 +31,6 @@ jobs:
2931

3032
- name: Build source
3133
run: spago build --no-install --purs-args '--censor-lib --strict'
34+
35+
- name: Check formatting
36+
run: purs-tidy check src test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
!.gitignore
33
!.github
44
!.editorconfig
5+
!.tidyrc.json
56

67
output
78
generated-docs

.tidyrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"importSort": "source",
3+
"importWrap": "source",
4+
"indent": 2,
5+
"operatorsFile": null,
6+
"ribbon": 1,
7+
"typeArrowPlacement": "first",
8+
"unicode": "never",
9+
"width": null
10+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ New features:
1111
Bugfixes:
1212

1313
Other improvements:
14+
- Added `purs-tidy` formatter (#21 by @thomashoneyman)
1415

1516
## [v6.0.0](https://github.com/purescript-contrib/purescript-fixed-points/releases/tag/v6.0.0) - 2021-02-26
1617

src/Data/Functor/Mu.purs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ newtype Mu f = In (f (Mu f))
1919

2020
-- | Rewrites a tree along a natural transformation.
2121
transMu
22-
f g
23-
. (Functor g)
24-
f ~> g
25-
Mu f
26-
Mu g
22+
:: forall f g
23+
. (Functor g)
24+
=> f ~> g
25+
-> Mu f
26+
-> Mu g
2727
transMu η =
2828
roll
2929
<<< map (transMu η)

0 commit comments

Comments
 (0)