diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2008-07-31 01:23:42 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2008-07-31 01:23:42 +0000 |
commit | 41f08e8e43a0c1b2080a24a4d9742ea804068f5a (patch) | |
tree | a95fb9876da5968afb0e0e6d69fe018bb258f469 /compiler/deSugar | |
parent | cec9b62f2ccdd358aa1d99c4143794b541b87f7e (diff) | |
download | haskell-41f08e8e43a0c1b2080a24a4d9742ea804068f5a.tar.gz |
Handle introduction of MkCore in MatchLit
Diffstat (limited to 'compiler/deSugar')
-rw-r--r-- | compiler/deSugar/MatchLit.lhs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs index a3b59d117b..b6079d31b1 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) |