X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FdeSugar%2FDsMeta.hs;h=31a8a0dbf122bc61c300f7eda63392e2664f996f;hb=6da2fdc8c83b7f3f400496216f06c9b14ab5efc2;hp=e31202831647073340f42e689f410b0811866993;hpb=550421384b8364cdaf3135f7859c9f7d7ee1fff1;p=ghc-hetmet.git diff --git a/ghc/compiler/deSugar/DsMeta.hs b/ghc/compiler/deSugar/DsMeta.hs index e312028..31a8a0d 100644 --- a/ghc/compiler/deSugar/DsMeta.hs +++ b/ghc/compiler/deSugar/DsMeta.hs @@ -489,15 +489,15 @@ repE (ArithSeqIn aseq) = repE (PArrSeqOut _ aseq) = panic "DsMeta.repE: parallel array seq.s missing" repE (HsCoreAnn _ _) = panic "DsMeta.repE: Can't represent CoreAnn" -- hdaume: core annotations repE (HsSCC _ _) = panic "DsMeta.repE: Can't represent SCC" -repE (HsBracketOut _ _) = - panic "DsMeta.repE: Can't represent Oxford brackets" -repE (HsSplice n e) = do { mb_val <- dsLookupMetaEnv n - ; case mb_val of - Just (Splice e) -> do { e' <- dsExpr e - ; return (MkC e') } - other -> pprPanic "HsSplice" (ppr n) } -repE e = - pprPanic "DsMeta.repE: Illegal expression form" (ppr e) +repE (HsBracketOut _ _) = panic "DsMeta.repE: Can't represent Oxford brackets" +repE (HsSpliceE (HsSplice n _)) + = do { mb_val <- dsLookupMetaEnv n + ; case mb_val of + Just (Splice e) -> do { e' <- dsExpr e + ; return (MkC e') } + other -> pprPanic "HsSplice" (ppr n) } + +repE e = pprPanic "DsMeta.repE: Illegal expression form" (ppr e) ----------------------------------------------------------------------------- -- Building representations of auxillary structures like Match, Clause, Stmt, @@ -1154,7 +1154,7 @@ repOverloadedLiteral :: HsOverLit -> DsM (Core TH.Lit) repOverloadedLiteral (HsIntegral i _) = do { lit <- mk_integer i; repLiteral lit } repOverloadedLiteral (HsFractional f _) = do { lit <- mk_rational f; repLiteral lit } -- The type Rational will be in the environment, becuase - -- the smart constructor 'THSyntax.rationalL' uses it in its type, + -- the smart constructor 'TH.Syntax.rationalL' uses it in its type, -- and rationalL is sucked in when any TH stuff is used --------------- Miscellaneous ------------------- @@ -1271,11 +1271,11 @@ templateHaskellNames = [ varStrictTypeQTyConName, typeQTyConName, expTyConName, decTyConName, typeTyConName, matchTyConName, clauseTyConName] -tH_SYN_Name = mkModuleName "Language.Haskell.TH.THSyntax" -tH_LIB_Name = mkModuleName "Language.Haskell.TH.THLib" +tH_SYN_Name = mkModuleName "Language.Haskell.TH.Syntax" +tH_LIB_Name = mkModuleName "Language.Haskell.TH.Lib" thSyn :: Module --- NB: the THSyntax module comes from the "haskell-src" package +-- NB: the TH.Syntax module comes from the "haskell-src" package thSyn = mkModule thPackage tH_SYN_Name thLib = mkModule thPackage tH_LIB_Name @@ -1288,7 +1288,7 @@ libTc = mk_known_key_name thLib OccName.tcName thFun = mk_known_key_name thSyn OccName.varName thTc = mk_known_key_name thSyn OccName.tcName --------------------- THSyntax ----------------------- +-------------------- TH.Syntax ----------------------- qTyConName = thTc FSLIT("Q") qTyConKey nameTyConName = thTc FSLIT("Name") nameTyConKey fieldExpTyConName = thTc FSLIT("FieldExp") fieldExpTyConKey @@ -1312,7 +1312,7 @@ mkNameG_tcName = thFun FSLIT("mkNameG_tc") mkNameG_tcIdKey mkNameUName = thFun FSLIT("mkNameU") mkNameUIdKey --------------------- THLib ----------------------- +-------------------- TH.Lib ----------------------- -- data Lit = ... charLName = libFun FSLIT("charL") charLIdKey stringLName = libFun FSLIT("stringL") stringLIdKey