hscParseIdentifier,
#ifdef GHCI
hscStmt, hscTcExpr, hscKcType,
- hscGetInfo, GetInfoResult,
compileExpr,
#endif
) where
#ifdef GHCI
import HsSyn ( Stmt(..), LHsExpr, LStmt, LHsType )
-import IfaceSyn ( IfaceDecl, IfaceInst )
import Module ( Module )
import CodeOutput ( outputForeignStubs )
import ByteCodeGen ( byteCodeGen, coreExprToBCOs )
import CoreTidy ( tidyExpr )
import CorePrep ( corePrepExpr )
import Flattening ( flattenExpr )
-import TcRnDriver ( tcRnStmt, tcRnExpr, tcRnGetInfo, GetInfoResult, tcRnType )
-import RdrName ( rdrNameOcc )
-import OccName ( occNameUserString )
+import TcRnDriver ( tcRnStmt, tcRnExpr, tcRnType )
import Type ( Type )
import PrelNames ( iNTERACTIVE )
import Kind ( Kind )
import CoreLint ( lintUnfolding )
import DsMeta ( templateHaskellNames )
-import BasicTypes ( Fixity )
-import SrcLoc ( SrcLoc, noSrcLoc )
+import SrcLoc ( noSrcLoc )
import VarEnv ( emptyTidyEnv )
#endif
import CodeOutput ( codeOutput )
import DynFlags
-import DriverPhases ( HscSource(..) )
import ErrUtils
import UniqSupply ( mkSplitUniqSupply )
; writeIfaceFile hsc_env (ms_location mod_summary) new_iface no_change
- ; let { final_details = ModDetails { md_types = mg_types ds_result,
- md_exports = mg_exports ds_result,
- md_insts = mg_insts ds_result,
- md_rules = mg_rules ds_result } }
-- And the answer is ...
; dumpIfaceStats hsc_env
- ; return (HscRecomp final_details
- new_iface
+ ; return (HscRecomp details new_iface
False False Nothing)
}
%************************************************************************
%* *
-\subsection{Getting information about an identifer}
-%* *
-%************************************************************************
-
-\begin{code}
-#ifdef GHCI
-hscGetInfo -- like hscStmt, but deals with a single identifier
- :: HscEnv
- -> String -- The identifier
- -> IO [GetInfoResult]
-
-hscGetInfo hsc_env str
- = do maybe_rdr_name <- hscParseIdentifier (hsc_dflags hsc_env) str
- case maybe_rdr_name of {
- Nothing -> return [];
- Just (L _ rdr_name) -> do
-
- maybe_tc_result <- tcRnGetInfo hsc_env (hsc_IC hsc_env) rdr_name
-
- case maybe_tc_result of
- Nothing -> return []
- Just things -> return things
- }
-#endif
-\end{code}
-
-%************************************************************************
-%* *
Desugar, simplify, convert to bytecode, and link an expression
%* *
%************************************************************************