PureScript (original) (raw)
A strongly-typed functional programming language that compiles to JavaScript
Benefits
- Compile to readable JavaScript and reuse existing JavaScript code easily
- An extensive collection of libraries for development of web applications, web servers, apps and more
- Excellent tooling and editor support with instant rebuilds
- An active community with many learning resources
- Build real-world applications using functional techniques and expressive types, such as:
- Algebraic data types and pattern matching
- Row polymorphism and extensible records
- Higher kinded types
- Type classes with functional dependencies
- Higher-rank polymorphism
Hello, PureScript!
import Prelude import Effect.Console (log)
greet :: String -> String greet name = "Hello, " <> name <> "!"
main = log (greet "World")
Get the compiler
Binaries
Precompiled binaries are available for OSX, Linux, and Windows from the latest release page on GitHub.
npm
npm install -g purescript
(Installation via npm
requires Node version 8 or later)
Tools
The recommended build tool for PureScript is Spago, which can be installed using npm
:
npm install -g spago
You might like to install some of theseadditional tools and editor plugins.
NPM is recommended for managing JavaScript dependencies in your project.