PureScript is a small strongly, statically typed programming language with expressive types, written in and inspired by Haskell, and compiling to JavaScript. It can be used to develop web applications, server side apps, and also desktop applications with use of Electron.
- 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
Here’s our recommended free books to learn PureScript.
1. PureScript by Example by Phil Freeman
PureScript is a programming language which features lightweight syntax which allows us to write very expressive code which is still clear and readable. It uses a rich type system to support powerful abstractions. It also generates fast, understandable code, which is important when interoperating with JavaScript, or other languages which compile to JavaScript.
The author seeks to convince creaders that PureScript strikes a very practical balance between the theoretical power of purely functional
programming, and the fast-and-loose programming style of JavaScript.
Chapters cover:
- Introduction.
- Getting Started
- Functions and Records.
- Recursion, Maps and Folds.
- Pattern Matching.
- Type Classes.
- Applicative Validation.
- The Eff Monad.
- Canvas Graphics.
- The Foreign Function Interface.
- Monadic Adventures.
- Callback Hell.
- Generative Testing.
- Domain-Specific Languages.
The book is published under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
The author of the book is the original developer of PureScript language and compiler, and written several of its core libraries.
2. PureScript-Cookbook by Jordan Martinez
PureScript-Cookbook is an unofficial Cookbook for PureScript. It offers a good selection of recipes including things like how to print, create, and use values of the BigIntJs type in either the node.js or web browser console.
The cookbook is published under the MIT license.
3. Jordan’s Purescript Reference by Jordan Martinez
Learn PureScript with this “clone and play” repository.
This is not a book in a traditional sense.
All books in this series:
Free Programming Books | |
---|---|
Java | General-purpose, concurrent, class-based, object-oriented, high-level language |
C | General-purpose, procedural, portable, high-level language |
Python | General-purpose, structured, powerful language |
C++ | General-purpose, portable, free-form, multi-paradigm language |
C# | Combines the power and flexibility of C++ with the simplicity of Visual Basic |
JavaScript | Interpreted, prototype-based, scripting language |
PHP | PHP has been at the helm of the web for many years |
HTML | HyperText Markup Language |
SQL | Access and manipulate data held in a relational database management system |
Ruby | General purpose, scripting, structured, flexible, fully object-oriented language |
Assembly | As close to writing machine code without writing in pure hexadecimal |
Swift | Powerful and intuitive general-purpose programming language |
Groovy | Powerful, optionally typed and dynamic language |
Go | Compiled, statically typed programming language |
Pascal | Imperative and procedural language designed in the late 1960s |
Perl | High-level, general-purpose, interpreted, scripting, dynamic language |
R | De facto standard among statisticians and data analysts |
COBOL | Common Business-Oriented Language |
Scala | Modern, object-functional, multi-paradigm, Java-based language |
Fortran | The first high-level language, using the first compiler |
Scratch | Visual programming language designed for 8-16 year-old children |
Lua | Designed as an embeddable scripting language |
Logo | Dialect of Lisp that features interactivity, modularity, extensibility |
Rust | Ideal for systems, embedded, and other performance critical code |
Lisp | Unique features - excellent to study programming constructs |
Ada | ALGOL-like programming language, extended from Pascal and other languages |
Haskell | Standardized, general-purpose, polymorphically, statically typed language |
Scheme | A general-purpose, functional language descended from Lisp and Algol |
Prolog | A general purpose, declarative, logic programming language |
Forth | Imperative stack-based programming language |
Clojure | Dialect of the Lisp programming language |
Julia | High-level, high-performance language for technical computing |
Awk | Versatile language designed for pattern scanning and processing language |
CoffeeScript | Transcompiles into JavaScript inspired by Ruby, Python and Haskell |
BASIC | Beginner’s All-purpose Symbolic Instruction Code |
Erlang | General-purpose, concurrent, declarative, functional language |
VimL | Powerful scripting language of the Vim editor |
OCaml | The main implementation of the Caml language |
ECMAScript | Best known as the language embedded in web browsers |
Bash | Shell and command language; popular both as a shell and a scripting language |
LaTeX | Professional document preparation system and document markup language |
TeX | Markup and programming language - create professional quality typeset text |
Arduino | Inexpensive, flexible, open source microcontroller platform |
TypeScript | Strict syntactical superset of JavaScript adding optional static typing |
Elixir | Relatively new functional language running on the Erlang virtual machine |
F# | Uses functional, imperative, and object-oriented programming methods |
Tcl | Dynamic language based on concepts of Lisp, C, and Unix shells |
Factor | Dynamic stack-based programming language |
Eiffel | Object-oriented language designed by Bertrand Meyer |
Agda | Dependently typed functional language based on intuitionistic Type Theory |
Icon | Wide variety of features for processing and presenting symbolic data |
XML | Rules for defining semantic tags describing structure ad meaning |
Vala | Object-oriented language, syntactically similar to C# |
Standard ML | General-purpose functional language characterized as "Lisp with types" |
D | General-purpose systems programming language with a C-like syntax |
Dart | Client-optimized language for fast apps on multiple platforms |
Markdown | Plain text formatting syntax designed to be easy-to-read and easy-to-write |
Kotlin | More modern version of Java |
Objective-C | Object-oriented language that adds Smalltalk-style messaging to C |
PureScript | Small strongly, statically typed language compiling to JavaScript |