afcondon / purescript-tagless-final-examples

Direct port of Phil Freeman's Haskell example to Purescript (see README for link)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Purescript Tagless Final Examples

Direct port to Purescript (from Haskell) of two examples of the finally tagless, partially evaluated pattern.

There are two examples here:

  • barebones example (SimpleEx directory) comes from Oleg Kiselyov's course notes example, here
  • side-effecting example (MonadicEx directory) comes from the example in Phil Freeman's talk, here

Each example is a standalone Pulp project, if you do a bower init; pulp build in each directory you should be able to verify that the code compiles (you can do a pulp run too, if you like but the examples don't actually do very much. The Monadic example also really only proves the concept generally but not usefully, showing String implementation and a partial Node.FS implementation which only implements ls)

Additional information:

About

Direct port of Phil Freeman's Haskell example to Purescript (see README for link)


Languages

Language:PureScript 93.2%Language:JavaScript 6.4%Language:Dhall 0.5%