Topic: Purescript¶
PureScript1 is a pure functional programming language which outputs JavaScript suitable to be run in the browser. Its design is based on Haskell, but it does differ.
Question
Where does PureScript differ from Haskell exactly?
Topics¶
Sources¶
- Video: Purescript unscripted - code reuse in purescript
- Video Series: Category Theory for Programmers - Bartosz Milewski
Backlinks¶
- Literate Programming in Purescript
- After looking for some literate programming software specific to PureScript, I found
literate-purescript
1. I found no way to build it without it erroring out, and I'm not comfortable with purescript dependencies to go digging just yet (plus, this was a Sunday - didn't want dependency management stress). After some hunting in the issues[^2] of the project, I found one of the users had published a version on npm aspaluh-litps
. A little npx later, and this worked just fine.
- After looking for some literate programming software specific to PureScript, I found
- Topic: Pure Functional Programming Languages
- PureScript Type Classes
- In purescript, type classes mostly work how users of Haskell would expect. However, type classes in purescript do need to be given names. This is because it transpiles into JavaScript, which needs to be able to name the entity.
- Topic: Programming Languages
- Notes
- Sum Type
- A sum type is the result of the sum operation on two or more algebraic types. In most programming languages, this is expressed with a pipe character. For example in purescript the type
Boolean
can be expressed as
- A sum type is the result of the sum operation on two or more algebraic types. In most programming languages, this is expressed with a pipe character. For example in purescript the type