-
Simon Peyton Jones authored
The problem with tagToEnum# is that it is not overloaded (in the Haskell sense) but you are only supposed to apply it to a TyCon that is an enumeration (isEnumerationTyCon). The Real Way to do this is to have some special kind of type constraint for the purpose, but that is wild overkill. So this patch adds a small rather ad-hoc check to TcExpr.instFun. Crude, simple, but it works fine. Fixes Trac #786 Test is tcfail164
c938c386