ds26gte / pyret-lang

The Pyret language.
Other
2 stars 0 forks source link

Problems with else clause #23

Closed schanzer closed 8 years ago

schanzer commented 8 years ago

Possibly related to recent changes, since I'm sure I would have seen this before...

(define (sign n) (cond [(< n 0) -1] [else 1]))

results in The name true is used but not defined at...

ds26gte commented 8 years ago

Fixed in ds26gte/code.pyret.org@f1fb23e.

We were desugaring else inside cond to the literal true, and so the special post-desugaring else treatment wasn't being exercised at all. And true is also no longer a literal, so perfect storm happened.

Removed the desugaring.

schanzer commented 8 years ago

Awesome - thanks for moving so quickly!