[project @ 2005-06-16 09:33:41 by simonmar]
authorsimonmar <unknown>
Thu, 16 Jun 2005 09:33:41 +0000 (09:33 +0000)
committersimonmar <unknown>
Thu, 16 Jun 2005 09:33:41 +0000 (09:33 +0000)
Fix stage1 compilation

ghc/compiler/main/GHC.hs

index 21b4fd9..dd86581 100644 (file)
@@ -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)
@@ -1848,16 +1850,6 @@ 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
 
 -- | Get the type of an expression