|
|
|
|
|
by Athas
3367 days ago
|
|
I am intrigued by this snippet from the README: type messages 'x = 'x | Fetch pid 'x
This appears to define a sum type where one of the variants is left with an implicit constructor. How do you pattern match on that? How do you do type inference? |
|
We should actually clean up that example you pointed out, matching on the `Fetch` constructor first. What we're really trying to support is unions like:
There's a yet un-had argument about the utility of this as well of course and we may want to remove the ability to do this entirely. The way we type this is by actually using type-checking guard functions like `is_integer` to convey information to the typer at compile time.