sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

poly: trouble with "it"

chsievers opened this issue · comments

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

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.