-
Notifications
You must be signed in to change notification settings - Fork 55
Some questions about optionals #321
Comments
Those are used internally by the compiler in two ways:
For a reason I cannot recall the syntax for none is |
Okay, so it seems that
|
Wait, no, we need separate names for |
I like the idea of having either |
|
In EData.v, what's the difference between
dleft
anddright
vsdsuccess
andderror
vsdsome
anddnone
vsdunit
? It seems thatreturn some(10);
in the REPL gives adleft
, not adsome
? At least, when it prints JSON, it's{"left": 10}
. Similarly, anenforce
error gives adright
.(Also, how do you create a
none
in the REPL?return none();
doesn't work, not sure what else to try.)P.S. The fact that I'm confused about this means that the REPL's match almost certainly does the wrong thing for optionals. So while this issue is a question, I guess it is actually also a bug report in disguise.
The text was updated successfully, but these errors were encountered: