2 % (c) The University of Glasgow, 2000
4 \section[CmCompile]{Compiler for GHCI}
7 module CmCompile ( cmCompile,
8 ModDetails, -- abstract
10 PersistentCompilerState, emptyPCS, -- abstract
11 HomeSymbolTable, -- not abstract (CM needs to see it)
12 HomeInterfaceTable, -- ditto
17 #include "HsVersions.h"
19 -- many of these need to be moved to HscTypes
20 --import CmLink ( Linkable(..) )
21 --import Outputable ( SDoc )
22 --import CmFind ( Finder )
23 --import CmSummarise ( ModSummary, name_of_summary )
24 --import FiniteMap ( FiniteMap, emptyFM )
26 --import Module ( Module )
27 --import RnMonad ( Avails, GlobalRdrEnv, DeclsMap,
28 -- WhetherHasOrphans, ImportVersion,
29 -- IfaceInsts, IfaceRules, ExportItem )
30 --import TcEnv ( TyThing, InstEnv )
31 --import Name ( Name, OccName )
32 --import BasicTypes ( Fixity, Version )
34 --import CoreSyn ( CoreRule )
35 --import RdrHsSyn ( RdrNameDeprecation, RdrNameRuleDecl, RdrNameFixitySig,
36 -- RdrNameHsDecl, RdrNameInstDecl )
43 %************************************************************************
45 \subsection{The main compiler interface}
47 %************************************************************************
51 cmCompile :: Finder -- to find modules
52 -> ModSummary -- summary, including source
53 -> Maybe ModIFace -- old interface, if available
54 -> HomeModMap -- ModuleName -> Module
55 -> HomeSymbolTable -- for home module ModDetails
56 -> PersistentCompilerState -- IN: persistent compiler state
59 cmCompile finder summary old_iface hst pcs
60 = do putStrLn ("cmCompile: compiling " ++ name_of_summary summary)
61 return (CompOK (error "cmCompile:modDetails")
62 (Just (error "cmCompile:modIFace",
63 --error "cmCompile:Linkable"
64 --LM (name_of_summary summary) []
65 LM (name_of_summary summary) []