Closed rtulip closed 1 year ago
By adding tuple support, the empty tuple can now be used as a unit type.
There isn't a way to mark a type as zero sized (yet). You can create new zero sized types, exactly as above. There are now some bugs with zero sized types, but those are going to be fixed over time.
It will be useful down the line to have a unit type, representing no change to the stack. To be consistent with the rest of the syntax, this should probably be the empty stack:
[]
This will be useful for something like:
Result<[] String>
down the line. Additionally, if the goal is to eventually have sum-types, we'll need a way to represent pure labels.This would be the first zero sized type in
Haystack
, which means there's a bunch of cases that need to be handled.Eg. would the following struct compile?