X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsUtils.lhs;h=db9460ee573d7b03ec4f1b97369a5590226e7ae3;hb=6ee9554a738c442719ded861504acb729fd3d431;hp=ee10a423795467a7e9e1e517a53f399fc2e690be;hpb=afe447cbaf20755edc16dc777b46af3f8f99f1cd;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsUtils.lhs b/compiler/hsSyn/HsUtils.lhs index ee10a42..db9460e 100644 --- a/compiler/hsSyn/HsUtils.lhs +++ b/compiler/hsSyn/HsUtils.lhs @@ -15,8 +15,6 @@ which deal with the intantiated versions are located elsewhere: \begin{code} module HsUtils where -#include "HsVersions.h" - import HsBinds import HsExpr import HsPat @@ -85,11 +83,11 @@ mkHsWrap co_fn e | isIdHsWrapper co_fn = e mkHsWrapCoI :: CoercionI -> HsExpr id -> HsExpr id mkHsWrapCoI IdCo e = e -mkHsWrapCoI (ACo co) e = mkHsWrap (WpCo co) e +mkHsWrapCoI (ACo co) e = mkHsWrap (WpCast co) e coiToHsWrapper :: CoercionI -> HsWrapper coiToHsWrapper IdCo = idHsWrapper -coiToHsWrapper (ACo co) = WpCo co +coiToHsWrapper (ACo co) = WpCast co mkHsLam :: [LPat id] -> LHsExpr id -> LHsExpr id mkHsLam pats body = mkHsPar (L (getLoc body) (HsLam matches)) @@ -144,9 +142,13 @@ mkBindStmt :: LPat idL -> LHsExpr idR -> StmtLR idL idR mkRecStmt :: [LStmtLR idL idR] -> StmtLR idL idR -mkHsIntegral i = HsIntegral i noSyntaxExpr -mkHsFractional f = HsFractional f noSyntaxExpr -mkHsIsString s = HsIsString s noSyntaxExpr +mkHsIntegral i = OverLit (HsIntegral i) noRebindableInfo noSyntaxExpr +mkHsFractional f = OverLit (HsFractional f) noRebindableInfo noSyntaxExpr +mkHsIsString s = OverLit (HsIsString s) noRebindableInfo noSyntaxExpr + +noRebindableInfo :: Bool +noRebindableInfo = error "noRebindableInfo" -- Just another placeholder; + mkHsDo ctxt stmts body = HsDo ctxt stmts body placeHolderType mkNPat lit neg = NPat lit neg noSyntaxExpr @@ -173,7 +175,7 @@ mkHsSplice :: LHsExpr RdrName -> HsSplice RdrName mkHsSplice e = HsSplice unqualSplice e unqualSplice :: RdrName -unqualSplice = mkRdrUnqual (mkVarOccFS FSLIT("splice")) +unqualSplice = mkRdrUnqual (mkVarOccFS (fsLit "splice")) -- A name (uniquified later) to -- identify the splice @@ -181,7 +183,7 @@ mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsQuasiQuote RdrName mkHsQuasiQuote quoter span quote = HsQuasiQuote unqualQuasiQuote quoter span quote unqualQuasiQuote :: RdrName -unqualQuasiQuote = mkRdrUnqual (mkVarOccFS FSLIT("quasiquote")) +unqualQuasiQuote = mkRdrUnqual (mkVarOccFS (fsLit "quasiquote")) -- A name (uniquified later) to -- identify the quasi-quote