Purescript - Jordans Reference

The Purescript by Example book is somewhat outdated due to using to 0.11.x and the breaking changes introduced in 0.12.0.

Moreover, while the Slack chatroom provides immediate help, many likely want a better, comprehensive, learner-friendly, ‘go-to’ reference for learning Purescript.

Since I’m still learning Purescript, I decided to use the Feynman technique to learn it by teaching it to others. Here is the following link to my repo:

It covers:

  • Getting Started
    • Installing Purescript for the first time
    • Understanding how to use the REPL
  • Build Tools
    • Bower vs psc-package
    • Pulp
    • Documents other tools that are active/inactive
  • “Verified by the compiler” syntax using meta-language
    • An explanation of Kinds
    • data (sum and product types, recursive types, higher-kinded types)
    • type
    • functions (pattern matching, guards, forall, etc.)
    • type classes (hierarchies, functional dependencies, deriving instances)
    • newtype
    • type-level syntax
  • Hello World
    • An easy intro to FP foundations and the Prelude package
    • A Hello World example
    • A number of console-based projects to teach FP concepts
      • error handling
      • custom type errors
      • mutable state
      • history of Effect/Aff/Eff

Remaining work to do:

  • Finish the testing section
  • Complete the benchmarking section
  • Explain how to structure most FP applications via Finally Tagless
  • Explain FP design patterns (e.g. smart constructors, phantom types, etc.)
  • Overview the ecosystem (all type class relationships, their laws, and their type signatures; categorizing libraries (bindings, data structures, etc.))

Ways you can help

  • verify my work or correct my mistakes
  • contribute explanations so that we all benefit and kill the ‘knowledge silo’ of FP programming
  • ask me to explain something to you that you don’t understand (if I’m interested, I’ll do it)

good work, I’m sure this will be helpful for others. :grin: