- compiles to js
- advanced, haskell-inspired type system ()
- no runtime (unlike elm, ghcjs, etc)
- focus on readable and debuggable js
pulp init
pulp build
pulp test
pulp docs
pulp server
import Prelude ((+))
add :: Number -> Number -> Number
add x y = x + y
import Prelude ((+))
add :: Int -> Int -> Int
add x y = x + y
data Maybe a = Nothing | Maybe a
data Maybe a = Nothing | Maybe a
greeting :: Maybe String
greeting = Just "hello."
silence :: Maybe String
silence = Nothing
data Direction
= North
| South
| East
| West
class Reversible a where
reverse :: a -> a
instance reversibleDirection :: Reversible Direction where
reverse North = South
reverse South = North
reverse East = West
reverse West = East
mirror :: forall a. (Reversible a) => a -> Tuple a a
mirror a = Tuple a (reverse a)