X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcRnDriver.lhs;h=fb7f803ee0a47772c728607f18a4298450ba473e;hb=70b59eb3397c68f10ce429c0ffcf5ed63d86d3d3;hp=c9f03c3c408e094fb9629251bd4b4ccf43b735ea;hpb=e79d44f15f7dd7b034746b702bd734792ded7f93;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcRnDriver.lhs b/ghc/compiler/typecheck/TcRnDriver.lhs index c9f03c3..fb7f803 100644 --- a/ghc/compiler/typecheck/TcRnDriver.lhs +++ b/ghc/compiler/typecheck/TcRnDriver.lhs @@ -84,7 +84,7 @@ import Outputable #ifdef GHCI import HsSyn ( HsStmtContext(..), Stmt(..), HsExpr(..), HsLocalBinds(..), HsValBinds(..), - LStmt, LHsExpr, LHsType, mkVarBind, + LStmt, LHsExpr, LHsType, mkMatchGroup, mkMatch, emptyLocalBinds, collectLStmtsBinders, collectLStmtBinders, nlVarPat, placeHolderType, noSyntaxExpr ) import RdrName ( GlobalRdrElt(..), globalRdrEnvElts, @@ -122,7 +122,7 @@ import HscTypes ( InteractiveContext(..), ModIface(..), icPrintUnqual, Dependencies(..) ) import BasicTypes ( Fixity ) -import SrcLoc ( unLoc, noSrcSpan ) +import SrcLoc ( unLoc ) #endif import FastString ( mkFastString ) @@ -950,7 +950,8 @@ mkPlan :: LStmt Name -> TcM PlanResult mkPlan (L loc (ExprStmt expr _ _)) -- An expression typed at the prompt = do { uniq <- newUnique -- is treated very specially ; let fresh_it = itName uniq - the_bind = mkVarBind noSrcSpan fresh_it expr + the_bind = L loc $ FunBind (L loc fresh_it) False matches emptyNameSet + matches = mkMatchGroup [mkMatch [] expr emptyLocalBinds] let_stmt = L loc $ LetStmt (HsValBinds (ValBindsIn (unitBag the_bind) [])) bind_stmt = L loc $ BindStmt (nlVarPat fresh_it) expr (HsVar bindIOName) noSyntaxExpr