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 ( Warning(..), Error(..) )
24 import RnUtils ( RnEnv(..) )
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 -> RnEnv -- renamer env (for doing derivings)
39 -> RenamedHsModule -- input module
44 (((TypecheckedHsBinds, -- record selector definitions
45 TypecheckedHsBinds, -- binds from class decls; does NOT
46 -- include default-methods bindings
47 TypecheckedHsBinds, -- binds from instance decls; INCLUDES
48 -- class default-methods binds
49 TypecheckedHsBinds, -- binds from value decls
51 [(Id, TypecheckedHsExpr)] -- constant instance binds
54 ([RenamedFixityDecl], [Id], [TyCon], [Class], Bag InstInfo),
55 -- things for the interface generator
58 -- environments of info from this module only
60 FiniteMap TyCon [(Bool, [Maybe Type])],
61 -- source tycon specialisation requests
63 PprStyle->Pretty), -- stuff to print for -ddump-deriving
65 Bag Warning) -- pretty-print this to get warnings
68 (Bag Error, -- pretty-print this to get errors
69 Bag Warning) -- pretty-print this to get warnings
71 typecheckModule us rn_env mod
72 = initTc us (tcModule rn_env mod)