Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

`(=)` is now a parse error

Open trillioneyes opened this issue 12 years ago • 2 comments

I discovered this in an IRC session while trying to demonstrate another problem.

<triliyn> > :t (=) Nat Nat
<idris-ircslave> error: (input):1:1: error: expected: end of input,
<idris-ircslave>     operator
<idris-ircslave> :t (=) Nat Nat<EOF> 
<idris-ircslave> ^                   

trillioneyes avatar Feb 12 '14 23:02 trillioneyes

Hmm, I think this might always have been a parse error, because = is treated specially as an operator - basically because of the clash with other uses of =.

We can probably make this work, though, as another special case in the parser. Not that I'm keen on adding special cases, but there could be an argument for this.

edwinb avatar Feb 18 '14 15:02 edwinb

I'm pretty sure it wasn't a parse error at one point. I remember partially applying it before (like (=) Nat) and being surprised that it wanted the type arguments first (I thought they were implicit).

trillioneyes avatar Feb 18 '14 18:02 trillioneyes