projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
593daf3
)
[project @ 2005-06-16 09:33:41 by simonmar]
author
simonmar
<unknown>
Thu, 16 Jun 2005 09:33:41 +0000
(09:33 +0000)
committer
simonmar
<unknown>
Thu, 16 Jun 2005 09:33:41 +0000
(09:33 +0000)
Fix stage1 compilation
ghc/compiler/main/GHC.hs
patch
|
blob
|
history
diff --git
a/ghc/compiler/main/GHC.hs
b/ghc/compiler/main/GHC.hs
index
21b4fd9
..
dd86581
100644
(file)
--- a/
ghc/compiler/main/GHC.hs
+++ b/
ghc/compiler/main/GHC.hs
@@
-703,6
+703,22
@@
type ParsedSource = Located (HsModule RdrName)
type RenamedSource = HsGroup Name
type TypecheckedSource = LHsBinds Id
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
-- | 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
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:
-- 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)
-- ToDo: check for small transformations that happen to the syntax in
-- the typechecker (eg. -e ==> negate e, perhaps for fromIntegral)
@@
-1848,16
+1850,6
@@
lookupName :: Session -> Name -> IO (Maybe TyThing)
lookupName s name = withSession s $ \hsc_env -> tcRnLookupName hsc_env name
-- -----------------------------------------------------------------------------
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
-- | Get the type of an expression
-- Getting the type of an expression
-- | Get the type of an expression