2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
4 \section[Typecheck]{Outside-world interfaces to the typechecker}
7 #include "HsVersions.h"
10 typecheckModule, InstInfo
15 import TcModule ( tcModule )
16 import TcInstUtil ( InstInfo )
22 import ErrUtils ( TcWarning(..), TcError(..) )
24 import RnUtils ( GlobalNameMappers(..), GlobalNameMapper(..) )
25 import Maybes ( MaybeErr(..) )
28 The typechecker stuff lives inside a complicated world of @TcM@
31 ToDo: Interfaces for interpreter ...
32 Typecheck an expression
33 Typecheck an interface
37 :: UniqSupply -- name supply in
38 -> GlobalNameMappers -- renamer info (for doing derivings)
39 -> RenamedHsModule -- input module
44 (((TypecheckedHsBinds, -- binds from class decls; does NOT
45 -- include default-methods bindings
46 TypecheckedHsBinds, -- binds from instance decls; INCLUDES
47 -- class default-methods binds
48 TypecheckedHsBinds, -- binds from value decls
50 [(Id, TypecheckedHsExpr)] -- constant instance binds
53 ([RenamedFixityDecl], [Id], [TyCon], [Class], Bag InstInfo),
54 -- things for the interface generator
57 -- environments of info from this module only
59 FiniteMap TyCon [(Bool, [Maybe Type])],
60 -- source tycon specialisation requests
62 PprStyle->Pretty), -- stuff to print for -ddump-deriving
64 Bag TcWarning) -- pretty-print this to get warnings
67 (Bag TcError, -- pretty-print this to get errors
68 Bag TcWarning) -- pretty-print this to get warnings
70 typecheckModule us renamer_name_funs mod
71 = initTc us (tcModule renamer_name_funs mod)