X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FDsMeta.hs;h=554a9453eab8336d26c3437dddf7fdb9081cbba9;hp=7d9b717b5552de6f4956f96d642f096bd4fb9b9f;hb=66579ff945831c5fc9a17c58c722ff01f2268d76;hpb=c97c0ab354da338854574f9c1fb89f7db061d4ae diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index 7d9b717..554a945 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -28,6 +28,8 @@ module DsMeta( dsBracket, quoteExpName, quotePatName ) where +#include "HsVersions.h" + import {-# SOURCE #-} DsExpr ( dsExpr ) import MatchLit @@ -53,6 +55,7 @@ import TcType import TyCon import TysWiredIn import CoreSyn +import MkCore import CoreUtils import SrcLoc import Unique @@ -948,7 +951,7 @@ globalVar name ; MkC uni <- coreIntLit (getKey (getUnique name)) ; rep2 mkNameLName [occ,uni] } where - mod = nameModule name + mod = ASSERT( isExternalName name) nameModule name name_mod = moduleNameString (moduleName mod) name_pkg = packageIdString (modulePackageId mod) name_occ = nameOccName name @@ -1249,7 +1252,7 @@ repNamedTyCon (MkC s) = rep2 conTName [s] repTupleTyCon :: Int -> DsM (Core TH.TypeQ) -- Note: not Core Int; it's easier to be direct here -repTupleTyCon i = rep2 tupleTName [mkIntExpr (fromIntegral i)] +repTupleTyCon i = rep2 tupleTName [mkIntExprInt i] repArrowTyCon :: DsM (Core TH.TypeQ) repArrowTyCon = rep2 arrowTName [] @@ -1344,7 +1347,7 @@ coreStringLit :: String -> DsM (Core String) coreStringLit s = do { z <- mkStringExpr s; return(MkC z) } coreIntLit :: Int -> DsM (Core Int) -coreIntLit i = return (MkC (mkIntExpr (fromIntegral i))) +coreIntLit i = return (MkC (mkIntExprInt i)) coreVar :: Id -> Core TH.Name -- The Id has type Name coreVar id = MkC (Var id)