stregaml
stregaml copied to clipboard
Experimenting with a language implementation in ocaml
Currently, these are supported by virtue of the GC and not checking - when I add the MIR, we'll need to actually start checking!
currently, pattern matching is limited to switching on the currently held variant. Full pattern matching would be great.
syntax: ```cafe effect Yield { func yield(Int32); } effect IoYield = Yield | Io; func generate() Yield { ... } func get_int() Io -> Int32 { ... } func input_stream()...
syntax: `type Array[T: type, N: UInt]` ```cafe func iter_map[ T: type, U: type, E: effect, ]( lst: List[T], f: func(T) E -> U, ) Yield[Int32] | E { ... }...