PureScript Get Started

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
wuct
August 02, 2018

PureScript Get Started

Setup the environment, install dependencies and use PureScript REPL to learn types!

wuct

August 02, 2018

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

16 slides
  1. Some learning resources • PureScript by Example (free e-book) •

    Learn You a Haskell for Great Good (free e-book) • Haskell Book ($59, the best e-book IMO) • egghead.io (free online videos) • purescript-users.ml/ (Discourse) • Functional programming on slack (#purescript, #purescript-beginner) • https://www.facebook.com/groups/PureScript.tw (Facebook group)
  2. Tools • purs - The PureScript compiler itself • pulp

    - A CLI tool which automates many of the tasks • psc-package - A package manager for PureScript • To install them all: • npm i -g purescript pulp psc-package-bin-simple • yarn global add purescript pulp psc-package-bin- simple
  3. Type Signature Notation in PureScript “::” is for type annotations

    "PureScript" !:: String New types can be created via type constructors ["PureScript"] !:: Array String ![["Pure"], ["Script"!]] !:: Array (Array String)
  4. Type Signature Notation in PureScript → is an infix type

    constructor for functions String → Number A function with multiple → is a curried function String → String → String
  5. Type Signature Notation in PureScript ∀ (forall) is the universal

    quantifier and lowercase letters stand for type variables ∀ a. a → a 㱺 expresses constraints on type variables ∀ a. Monoid a ⇒ a !-> a !-> a

More Decks by wuct

Other Decks in Programming