natefaubion / purescript-faq

An unofficial FAQ for the PureScript language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

purescript-faq

An unofficial FAQ for the PureScript language

What questions would you like to see in an FAQ?

This is a work-in-progress, so please suggest addition questions and/or answers.

How do I get started?

See the Getting Started Guide.

How do I bundle my app?

The simplest option is with spago bundle-app. This produces a single .js file that you can execute in node or include as a script (for example in your index.html). This runs dead-code-elimination, and that added delay is not ideal for quick iterations during development.

Some faster bundling option are:

The bundling process should improve once the PS compiler is modified to output ES modules.

What are my CSS options?

An issue tracking the start of a CSS guide.

What are some recommended frameworks for frontend web development?

What's on the roadmap?

The Indent to Implement page provides some visibility into items on the todo list, but could be clarified with more details on planned sequence. Ideally, we'd have a "roadmap summary" page, but until then, here's a short summary:

What's missing from having PureScript 1.0?

  • New package registry
  • ES6 modules
  • Better dead code elimination and bundling
  • Complete documentation
  • Smooth new-user experience

Do I need bower to install packages?

No. The docs referring to bower are outdated. Spago is is the recommended package management tool.

Why can't I install a package listed on Pursuit?

Pursuit lists all published packages, but not all of these make it into the package set accessible to spago. It is encouraged to open PRs to add these missing packages to the package set.

You may alternatively consult Starsuit, which is a Pursuit clone that is synced to the latest package set.

Pursuit plans to be better synced with the new registry.

What's a good development setup?

A list of available editor options.

Some framework templates also demonstrate how to setup a project with automatic rebuild and webpage refresh upon saving changes:

How does PureScript compare to language X?

There's a task for putting together these summaries. Feel free to contribute.

How do I write ... ?

The cookbook aims to provide lots of miscellaneous examples. Feel free to request additional examples.

Why use <<</>>> for function composition, and not <</>> (like Elm)?

We chose to match the syntax and capabilities of Haskell's Category class (we call it Semigroupoid and drop the identity requirement). Note that <<< in PureScript and Haskell allow for composing more than just functions, while << in Elm and . in Haskell only work for functions.

About

An unofficial FAQ for the PureScript language