Commit 7655c718 authored by Iavor S. Diatchki's avatar Iavor S. Diatchki

Go back to using an Integer as evidence, rather then just a Word.

parent cb843f69
......@@ -66,7 +66,6 @@ import FastString
import Util
import MonadUtils
import Data.Word(Word)
import Control.Monad(liftM)
\end{code}
......@@ -715,13 +714,7 @@ dsEvTerm (EvSuperClass d n)
sc_sel_id = classSCSelId cls n -- Zero-indexed
(cls, tys) = getClassPredTys (evVarPred d)
-- It would be better to make an Integer expression here, but this would
-- require quite a bit of the surrounding code to be monadified.
-- In the intereset of simplicity (and keeping changes incremental) we
-- leave this for a later day.
dsEvTerm (EvInteger n)
| n > fromIntegral (maxBound :: Word) = panic "dsEvTerm: Integer too big!"
| otherwise = return $ mkWordExprWord (fromInteger n)
dsEvTerm (EvInteger n) = mkIntegerExpr n
---------------------------------------
dsTcCoercion :: TcCoercion -> (Coercion -> CoreExpr) -> CoreExpr
......
......@@ -57,7 +57,6 @@ import Pair ( pSnd )
import UniqFM
import FastString ( sLit )
import DynFlags
import Data.Word(Word)
\end{code}
**********************************************************************
* *
......@@ -1775,8 +1774,7 @@ matchClassInst :: InertSet -> Class -> [Type] -> WantedLoc -> TcS LookupInstResu
matchClassInst _ clas [ ty ] _
| className clas == typeNatClassName
, Just n <- isNumberTy ty
, n <= fromIntegral (maxBound :: Word) = return (GenInst [] (EvInteger n))
, Just n <- isNumberTy ty = return (GenInst [] (EvInteger n))
matchClassInst inerts clas tys loc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment