Commit 1172cf9f authored by simonmar's avatar simonmar
Browse files

[project @ 2005-06-16 09:33:41 by simonmar]

Fix stage1 compilation
parent 593daf39
......@@ -703,6 +703,22 @@ type ParsedSource = Located (HsModule RdrName)
type RenamedSource = HsGroup Name
type TypecheckedSource = LHsBinds Id
-- NOTE:
-- - things that aren't in the output of the renamer:
-- - the export list
-- - the imports
-- - things that aren't in the output of the typechecker right now:
-- - the export list
-- - the imports
-- - type signatures
-- - type/data/newtype declarations
-- - class declarations
-- - instances
-- - extra things in the typechecker's output:
-- - default methods are turned into top-level decls.
-- - dictionary bindings
-- | This is the way to get access to parsed and typechecked source code
-- for a module. 'checkModule' loads all the dependencies of the specified
-- module in the Session, and then attempts to typecheck the module. If
......@@ -1682,36 +1698,22 @@ lookupGlobalName s name = withSession s $ \hsc_env -> do
eps <- readIORef (hsc_EPS hsc_env)
return $! lookupType (hsc_HPT hsc_env) (eps_PTE eps) name
#if 0
-- -----------------------------------------------------------------------------
-- Misc exported utils
data ObjectCode
= ByteCode
| BinaryCode FilePath
dataConType :: DataCon -> Type
dataConType dc = idType (dataConWrapId dc)
-- ToDo: typechecks abstract syntax or renamed abstract syntax. Issues:
-- - typechecked syntax includes extra dictionary translation and
-- AbsBinds which need to be translated back into something closer to
-- the original source.
-- | print a 'NamedThing', adding parentheses if the name is an operator.
pprParenSymName :: NamedThing a => a -> SDoc
pprParenSymName a = parenSymOcc (getOccName a) (ppr (getName a))
-- ToDo:
-- - Data and Typeable instances for HsSyn.
-- ----------------------------------------------------------------------------
-- ToDo:
-- - things that aren't in the output of the renamer:
-- - the export list
-- - the imports
#if 0
-- ToDo:
-- - things that aren't in the output of the typechecker right now:
-- - the export list
-- - the imports
-- - type signatures
-- - type/data/newtype declarations
-- - class declarations
-- - instances
-- - extra things in the typechecker's output:
-- - default methods are turned into top-level decls.
-- - dictionary bindings
-- - Data and Typeable instances for HsSyn.
-- ToDo: check for small transformations that happen to the syntax in
-- the typechecker (eg. -e ==> negate e, perhaps for fromIntegral)
......@@ -1847,16 +1849,6 @@ parseName s str = withSession s $ \hsc_env -> do
lookupName :: Session -> Name -> IO (Maybe TyThing)
lookupName s name = withSession s $ \hsc_env -> tcRnLookupName hsc_env name
-- -----------------------------------------------------------------------------
-- Misc exported utils
dataConType :: DataCon -> Type
dataConType dc = idType (dataConWrapId dc)
-- | print a 'NamedThing', adding parentheses if the name is an operator.
pprParenSymName :: NamedThing a => a -> SDoc
pprParenSymName a = parenSymOcc (getOccName a) (ppr (getName a))
-- -----------------------------------------------------------------------------
-- Getting the type of an expression
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment