From: Max Bolingbroke Date: Thu, 31 Jul 2008 01:23:42 +0000 (+0000) Subject: Handle introduction of MkCore in MatchLit X-Git-Tag: 2008-09-12~301 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=41f08e8e43a0c1b2080a24a4d9742ea804068f5a;p=ghc-hetmet.git Handle introduction of MkCore in MatchLit --- diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs index a3b59d1..b6079d3 100644 --- a/compiler/deSugar/MatchLit.lhs +++ b/compiler/deSugar/MatchLit.lhs @@ -22,6 +22,7 @@ import HsSyn import Id import CoreSyn +import MkCore import TyCon import DataCon import TcHsSyn ( shortCutLit ) @@ -61,17 +62,17 @@ See also below where we look for @DictApps@ for \tr{plusInt}, etc. \begin{code} dsLit :: HsLit -> DsM CoreExpr -dsLit (HsStringPrim s) = return (mkLit (MachStr s)) -dsLit (HsCharPrim c) = return (mkLit (MachChar c)) -dsLit (HsIntPrim i) = return (mkLit (MachInt i)) -dsLit (HsWordPrim w) = return (mkLit (MachWord w)) -dsLit (HsFloatPrim f) = return (mkLit (MachFloat f)) -dsLit (HsDoublePrim d) = return (mkLit (MachDouble d)) +dsLit (HsStringPrim s) = return (Lit (MachStr s)) +dsLit (HsCharPrim c) = return (Lit (MachChar c)) +dsLit (HsIntPrim i) = return (Lit (MachInt i)) +dsLit (HsWordPrim w) = return (Lit (MachWord w)) +dsLit (HsFloatPrim f) = return (Lit (MachFloat f)) +dsLit (HsDoublePrim d) = return (Lit (MachDouble d)) dsLit (HsChar c) = return (mkCharExpr c) dsLit (HsString str) = mkStringExprFS str dsLit (HsInteger i _) = mkIntegerExpr i -dsLit (HsInt i) = return (mkIntExpr i) +dsLit (HsInt i) = return (mkIntExpr (fromIntegral i)) dsLit (HsRat r ty) = do num <- mkIntegerExpr (numerator r)