fenollp/kju — pull request #28 by fenollp (2014-05-25 12:55:14+00:00)
Title: Type specs

This adds support for type `-specs` definitions and 2 snippets:

```haskell
b() :: true | false
h :: (b(), b()) -> b()
h (A, B) = A band B
```

```haskell
‹red_panda_food› :: bamboo | birds | eggs | berries
‹squid_food› :: sperm_whale
‹feed A› :: fun(() -> A)
feeder :: (red_panda) -> ‹feed ‹red_panda_food››
feeder (red_panda) = fun () -> bamboo end
feeder :: (squid) -> ‹feed ‹squid_food››
feeder (squid) = fun () -> sperm_whale end
```

As you can see there's actually 2 ways of writing type specs
* with braces and "function call notation"
* with `<>` or `‹›` and lispy notation

The later may not end up in the final version as
* it differs a lot from standard Erlang
* Scanning conflicts (eg. `>>`)
* Anywhere one introduces a piece of code to complete one uses *<>-notation*, that is text inside chevrons is meant to be replaced.