-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
055efeb
commit ff5c484
Showing
7 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ Throughout your learning process, it will be helpful to ask others for help. The | |
We'll show how to install the following programs: | ||
- `purescript` - the PureScript language & compiler | ||
- `spago` - a dependency manager and build tool for PureScript | ||
- (optional) a formatter for PureScript | ||
- `parcel` - a build tool for bundling a PureScript application into a multiple JS backends (node, browser, electron) | ||
|
||
### Installation | ||
|
@@ -44,14 +45,18 @@ Unlike the manual install, `nvm` properly handles the npm prefix for you. So, yo | |
|
||
Once you have installed `npm`, we can use it to install everything in one command: | ||
```bash | ||
npm i -g [email protected].2 [email protected] parcel | ||
npm i -g [email protected].3 [email protected] parcel | ||
``` | ||
|
||
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: | ||
- [purs-tidy](https://github.com/natefaubion/purescript-tidy) - A self-contained formatter written in PureScript | ||
- [pose](https://pose.rowtype.yoga/) - A plugin written in PureScript for the [`Prettier`](https://prettier.io/) formatter | ||
|
||
### Versions Used in this Project | ||
|
||
The following commands should now work (the versions beside them are the versions I used when writing this project): | ||
```bash | ||
purs --version # 0.14.2 | ||
purs --version # 0.14.3 | ||
spago version # 0.20.3 | ||
parcel --version # 1.12.4 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Formatters | ||
|
||
## History | ||
|
||
For the longest time, PureScript did not have a formatter. There are a number of reasons: | ||
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). | ||
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. | ||
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 | ||
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). | ||
1. Writing a formatter is very hard to do. It's typically a feat not done by your beginner or everyday programmer. | ||
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. | ||
|
||
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. | ||
|
||
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). | ||
|
||
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/). | ||
|
||
## Current Formatters | ||
|
||
| Formatter | Language | Author | Initial Announcement | | ||
| - | - | - | - | | ||
| [`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) | | ||
| [`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) | | ||
| [`purty`](https://gitlab.com/joneshf/purty) | Haskell | `@joneshf` | [Purty 1.0.0 released](https://discourse.purescript.org/t/purty-1-0-0-released/225) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters