Closed lpil closed 6 years ago
At the moment this is unfortunate but expected behaviour; a type constructor always consumes the immediately following argument as part of AST construction. I think fixing this will require the typer to modify the AST or some other sort of iterative back-and-forth process with the typer (full disclosure: I haven't thought through this properly yet ;) )
To be clear: I think this would be good to fix, just difficult in the immediate term :) (so please don't close this, let's use it for further discussion as ideas come up)
I'm going to close this for now as the fixes associated with #229 should make this clearer.
Longer-term it might be nice to do some type-directed re-interpretation of the AST but I'm not sure I want to go down that road just yet.
Given there is a function
assert.equal/2
definedAnd option is defined like so:
If this code is written:
It fails due to there being no function
assert.equal/1
If the
None
is surrounded in parens it compiles.