X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FDsUtils.lhs;h=ef16317f9532e5ff87d7624dd86f51afda3abb8a;hb=9d03becc597e5b1ab6c8466209a1263bf8ba6f29;hp=5eb33c8f977f16a40bbd1039bd2dabd2896fecb7;hpb=6febb616f1ff46942434e9df39c6e4977b07cc6f;p=ghc-hetmet.git diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs index 5eb33c8..ef16317f 100644 --- a/compiler/deSugar/DsUtils.lhs +++ b/compiler/deSugar/DsUtils.lhs @@ -117,7 +117,7 @@ lookupEvidence :: [(Name, Id)] -> Name -> Id lookupEvidence prs std_name = assocDefault (mk_panic std_name) prs std_name where - mk_panic std_name = pprPanic "dsSyntaxTable" (ptext SLIT("Not found:") <+> ppr std_name) + mk_panic std_name = pprPanic "dsSyntaxTable" (ptext (sLit "Not found:") <+> ppr std_name) \end{code} @@ -515,8 +515,8 @@ mkCharExpr c = mkConApp charDataCon [mkLit (MachChar c)] mkIntegerExpr i | inIntRange i -- Small enough, so start from an Int - = do integer_dc <- dsLookupDataCon smallIntegerDataConName - return (mkSmallIntegerLit integer_dc i) + = do integer_id <- dsLookupGlobalId smallIntegerName + return (mkSmallIntegerLit integer_id i) -- Special case for integral literals with a large magnitude: -- They are transformed into an expression involving only smaller @@ -525,9 +525,9 @@ mkIntegerExpr i | otherwise = do -- Big, so start from a string plus_id <- dsLookupGlobalId plusIntegerName times_id <- dsLookupGlobalId timesIntegerName - integer_dc <- dsLookupDataCon smallIntegerDataConName + integer_id <- dsLookupGlobalId smallIntegerName let - lit i = mkSmallIntegerLit integer_dc i + lit i = mkSmallIntegerLit integer_id i plus a b = Var plus_id `App` a `App` b times a b = Var times_id `App` a `App` b @@ -543,8 +543,8 @@ mkIntegerExpr i return (horner tARGET_MAX_INT i) -mkSmallIntegerLit :: DataCon -> Integer -> CoreExpr -mkSmallIntegerLit small_integer_data_con i = mkConApp small_integer_data_con [mkIntLit i] +mkSmallIntegerLit :: Id -> Integer -> CoreExpr +mkSmallIntegerLit small_integer i = mkApps (Var small_integer) [mkIntLit i] mkStringExpr str = mkStringExprFS (mkFastString str) @@ -872,7 +872,7 @@ mkTupleCase uniqs vars body scrut_var scrut one_tuple_case chunk_vars (us, vs, body) = let (us1, us2) = splitUniqSupply us - scrut_var = mkSysLocal FSLIT("ds") (uniqFromSupply us1) + scrut_var = mkSysLocal (fsLit "ds") (uniqFromSupply us1) (mkCoreTupTy (map idType chunk_vars)) body' = mkSmallTupleCase chunk_vars body scrut_var (Var scrut_var) in (us2, scrut_var:vs, body') @@ -1059,7 +1059,7 @@ mkTickBox ix vars e = do mkBinaryTickBox :: Int -> Int -> CoreExpr -> DsM CoreExpr mkBinaryTickBox ixT ixF e = do uq <- newUnique - let bndr1 = mkSysLocal FSLIT("t1") uq boolTy + let bndr1 = mkSysLocal (fsLit "t1") uq boolTy falseBox <- mkTickBox ixF [] $ Var falseDataConId trueBox <- mkTickBox ixT [] $ Var trueDataConId return $ Case e bndr1 boolTy