KeliLanguage / compiler

The compiler for Keli
https://keli-language.gitbook.io/doc/specification/
Apache License 2.0
171 stars 1 forks source link

Anonymous tagged union #61

Open wongjiahau opened 5 years ago

wongjiahau commented 5 years ago

Based on #59, we have an opportunity to introduce anonymous tagged union. This will be useful for defining one-off data type for function arguments and return types.

For example,

(url String).fetch 
    | cases
        .Ok(String)
        .Fail($.status(Int))
    = undefined