|Designed by||Phil Freeman|
0.15.12 / October 7, 2023
|Typing discipline||Inferred, static, strong|
Since then it has been picked up by the community and is developed on GitHub. Additional core tools developed by the community include the dedicated build tool "Pulp", the documentation directory "Pursuit", and the package manager "Spago"
PureScript features strict evaluation, persistent data structures and type inference. The PureScript type system shares many features with those of similar functional languages like Haskell: algebraic data types and pattern matching, higher kinded types, type classes and functional dependencies, and higher-rank polymorphism. PureScript's type system adds support for row polymorphism and extensible records. However, PureScript lacks support for some of the more advanced features of Haskell like GADTs and type families.
Here is a minimal "Hello world" program in PureScript:
module Main where import Effect.Console (log) main = log "Hello World!"
Here, the type of the program is inferred and checked by the PureScript transpiler. A more verbose version of the same program might include explicit type annotations:
module Main where import Prelude import Effect (Effect) import Effect.Console (log) main :: Effect Unit main = log "Hello World!"
- Elm (programming language) – Functional programming language
- Reason (programming language) – Syntax extension and toolchain for OCaml
- JS++ – Web programming language
- "purescript/purescript". GitHub. 3 June 2022.
- "PureScript to C++11 transpiler". GitHub. Retrieved 2023-01-22.
- purerl - the PureScript Erlang backend, purerl, 2023-09-04, retrieved 2023-09-05
- "PureScript to Go transpiler". GitHub. Retrieved 2023-01-22.
- "PureScript". purescript.org. Retrieved 2019-03-14.
- purescript/documentation, PureScript, 2023-02-19, retrieved 2023-02-20
- Alternative backends, PureScript, 2023-02-19, retrieved 2023-02-20
- "Read PureScript by Example | Leanpub". leanpub.com. Retrieved 2019-03-14.
- A build tool for PureScript projects, PureScript Contrib, 2019-03-08, retrieved 2019-03-14
- "Pursuit". pursuit.purescript.org. Retrieved 2019-03-14.
- 🍝 PureScript package manager and build tool powered by Dhall and package-sets: spacchetti/spago, spacchetti, 2019-03-14, retrieved 2019-03-14
- Documentation for the PureScript language, compiler, and tools.: purescript/documentation, PureScript, 2019-03-14, retrieved 2019-03-14
- "The Foreign Function Interface". PureScript. 2015-07-15. Retrieved 2023-01-22.
- "FFI". PureScript. 2019-07-26. Retrieved 2023-01-22.
- C++ foreign export implementations for the standard library, PureScript, 2019-07-26, retrieved 2023-01-22
- "Go foreign export implementations for the standard library". PureScript. 2020-12-13. Retrieved 2023-01-22.
- purs ide: Editor and tooling support for the PureScript programming language, 2019-04-21, retrieved 2019-04-21
- Implementing type directed search for PureScript, 2016-10-27
- Matthías Páll Gissurarson (2018-09-27), "Suggesting Valid Hole Fits for Typed-Holes (Experience Report)", ACM SIGPLAN Notices, 53 (7): 179–185, doi:10.1145/3299711.3242760, S2CID 218480974