Skip to content

Commit ff5c484

Browse files
Make next major release: v0.14.x-0.30.0 (#571)
* Ensure .ci dir is not included in mdbook output * Update purs to v0.14.3 * Upgrade to latest package set * Link to `aftok` * Link to 'final tagless have little to do with typeclasses' * Add note about purs-tidy and pose PS formatters
1 parent 055efeb commit ff5c484

File tree

7 files changed

+37
-5
lines changed

7 files changed

+37
-5
lines changed

.procedures/redeploy-book.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# - `../purescript-jordans-reference-site/src/Summary-header.md` file exists
99

1010
# Regenerate `mdbook`'s source content
11-
node .procedures/mdbook-toc.js -r "." -o "../purescript-jordans-reference-site/src" -s "Summary-header.md"
11+
node .procedures/mdbook-toc.js -r "." -o "../purescript-jordans-reference-site/src" -s "Summary-header.md" -t ".ci,.git,.github,.procedures,.travis,output,book,mdbook"
1212

1313
cd ../purescript-jordans-reference-site
1414

01-Getting-Started/04-Install-Guide.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Throughout your learning process, it will be helpful to ask others for help. The
1414
We'll show how to install the following programs:
1515
- `purescript` - the PureScript language & compiler
1616
- `spago` - a dependency manager and build tool for PureScript
17+
- (optional) a formatter for PureScript
1718
- `parcel` - a build tool for bundling a PureScript application into a multiple JS backends (node, browser, electron)
1819

1920
### Installation
@@ -44,14 +45,18 @@ Unlike the manual install, `nvm` properly handles the npm prefix for you. So, yo
4445

4546
Once you have installed `npm`, we can use it to install everything in one command:
4647
```bash
47-
48+
4849
```
4950

51+
If you want to install a PureScript formatter, refer to their instructions. The history behind these tools will be covered in the `Build Tools` folder:
52+
- [purs-tidy](https://github.com/natefaubion/purescript-tidy) - A self-contained formatter written in PureScript
53+
- [pose](https://pose.rowtype.yoga/) - A plugin written in PureScript for the [`Prettier`](https://prettier.io/) formatter
54+
5055
### Versions Used in this Project
5156

5257
The following commands should now work (the versions beside them are the versions I used when writing this project):
5358
```bash
54-
purs --version # 0.14.2
59+
purs --version # 0.14.3
5560
spago version # 0.20.3
5661
parcel --version # 1.12.4
5762
```

03-Build-Tools/05-Formatters.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Formatters
2+
3+
## History
4+
5+
For the longest time, PureScript did not have a formatter. There are a number of reasons:
6+
1. Since `PureScript` is written in Haskell, people are less likely to contribute since Haskell is still different from PureScript (even if they share similarities).
7+
1. Ideally, `PureScript` would be written in PureScript. Unfortunately, if `PureScript` was self-hosted, runtime performance of the `purs` binary would suffer greatly otherwise. See [purescript/purescript-in-purescript](https://github.com/purescript/purescript-in-purescript), which was stopped after that realization was made.
8+
2. Realistically, a formatter could be written in Haskell and reuse the PureScript language's parser. However, then less people would contribute as not everyone is familiar with Haskell
9+
3. If a formatter was written in PureScript, it would get more contributions.However, it would have to reimplement the PureScript language's parser and stay in sync with any changes made to the language. Moreover, it would likely be slower than writing it in a lower-level language (e.g. Haskell).
10+
1. Writing a formatter is very hard to do. It's typically a feat not done by your beginner or everyday programmer.
11+
1. Once written, maintainers can burn out because many individuals will want configuration added (e.g. "it should indent A in situation Y exactly N spaces but only M spaces in situation Z"). If the configuration is not added, people complain. If it is added, others might later complain about how it has TOO much configuration. Either way, it's typically the maintainer who adds the feature and those who want it don't contribute.
12+
13+
The first formatter written was [`purty`](https://gitlab.com/joneshf/purty). This formatter was written in Haskell. It was the only formatter for a number of years. Some in the community chose to use it while others did not.
14+
15+
Around March/April 2021, `@natefaubion` wrote a PureScript implementation of the PureScript language's parser: [natefaubion/purescript-language-cst-parser](https://github.com/natefaubion/purescript-language-cst-parser).
16+
17+
The second and third formatters, [`purs-tidy`](https://github.com/natefaubion/purescript-tidy) and [`pose`](https://pose.rowtype.yoga/), respectively, were announced around the same time in August 2021. Both projects were under developement without knowing about each other. `purs-tidy` is a standalone formatter whereas `pose` is a plugin for the [`Prettier` formatter](https://prettier.io/).
18+
19+
## Current Formatters
20+
21+
| Formatter | Language | Author | Initial Announcement |
22+
| - | - | - | - |
23+
| [`purs-tidy`](https://github.com/natefaubion/purescript-tidy) | PureScript | `@natefaubion` | [Announcing `purs-tidy`: a syntax tidy-upper for PureScript](https://discourse.purescript.org/t/tiny-announcement-yet-another-purescript-formatter/2525) |
24+
| [`pose`](https://pose.rowtype.yoga/) | PureScript | `@Zelenaya`/`@i-am-the-slime` | [Tiny announcement: yet another PureScript formatter](https://discourse.purescript.org/t/tiny-announcement-yet-another-purescript-formatter/2525) |
25+
| [`purty`](https://gitlab.com/joneshf/purty) | Haskell | `@joneshf` | [Purty 1.0.0 released](https://discourse.purescript.org/t/purty-1-0-0-released/225) |

21-Hello-World/05-Application-Structure/Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ To get a general idea for the concept this folder is going to try to teach:
3535
- 'Which code is more reusable' (45:28 - 50:29):
3636
- Final Encoding = Provide an implementation as an argument = monad transformers (what we cover first in this folder)
3737
- Initial Encoding = Interpret a result = `Free` monad (what we cover second in this folder)
38+
- Optional reading: [Final tagless encodings have little to do with typeclasses](https://www.foxhound.systems/blog/final-tagless/)
3839

3940
Another learning resource that is still a work-in-progress but which will explain more than this work is 'Functional Design and Architecture':
4041
- [Reddit post introducing it](https://np.reddit.com/r/haskell/comments/avaxda/the_campaign_for_my_book_functional_design_and/?st=jsowhkm4&sh=d2be89c4)

21-Hello-World/11-Next-Steps.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The below programs were written by me when I was first learning how to design pr
3030
- [jonasbuntinx' - 'Real World App' (React Version)](https://github.com/jonasbuntinx/purescript-react-realworld)
3131
- [jaspervdj's 'Beeraffe' game](https://github.com/jaspervdj/beeraffe/)
3232
- [AndrewBrownK's 'Minesweeper CLI' game](https://github.com/AndrewBrownK/purescript-minesweeper-cli)
33+
- [`aftok`](https://github.com/aftok/aftok)
3334

3435
### Projects in non-JS backends
3536

mdbook/Preface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If you want to learn PureScript, read the entire work from start to finish.
1414

1515
## Overview and Scope of the Work
1616

17-
All code in this work uses PureScript `0.14.2`
17+
All code in this work uses PureScript `0.14.3`
1818

1919
This work was created so a reader can understand PureScript and how to use it properly from a deep foundational understanding. Most other resources will get you started quickly, but then you will get confused at some point along the way. This resource takes longer to get started, but you will either not be confused or be less confused when we get to more advanced topics (e.g. monad transformers, type-level programming, etc.)
2020

packages.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
let upstream =
2-
https://github.com/purescript/package-sets/releases/download/psc-0.14.2-20210629/packages.dhall sha256:534c490bb73cae75adb5a39871142fd8db5c2d74c90509797a80b8bb0d5c3f7b
2+
https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210808/packages.dhall sha256:dbc06803c031113d3f9e001f8d95629e48da720d2bfe45d8bbe2c0cffcef293d
33

44
let additions =
55
{ benchotron =

0 commit comments

Comments
 (0)