sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
MIT License
3.34k stars 256 forks source link

poly: trouble with "it" #39

Closed chsievers closed 7 years ago

chsievers commented 9 years ago

I'm not sure if it is a feature or an implementation artefact, but the user can find it with :browse and using it leads to trouble:

Poly> 1
1 : Int
Poly> :browse
it : Int
Poly> it+it
4 : Int
Poly> it==it
poly: Pattern match failure in do expression at Eval.hs:39:5-11
sdiehl commented 9 years ago

I'll be out for a few days, but I'l look at this weekend. I think it's just a silly bug, trying to replicate GHCi's it variable which holds the last evaluated expression.