Commit 334ce30e authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Massive patch for the first months work adding System FC to GHC #17

Broken up massive patch -=chak
Original log message:  
This is (sadly) all done in one patch to avoid Darcs bugs.
It's not complete work... more FC stuff to come.  A compiler
using just this patch will fail dismally.
parent 2cab0d72
......@@ -6,7 +6,7 @@ module IfaceEnv (
lookupIfaceTop, lookupIfaceExt,
lookupOrig, lookupIfaceTc,
newIfaceName, newIfaceNames,
extendIfaceIdEnv, extendIfaceTyVarEnv, refineIfaceIdEnv,
extendIfaceIdEnv, extendIfaceTyVarEnv,
tcIfaceLclId, tcIfaceTyVar,
lookupAvail, ifaceExportNames,
......@@ -24,7 +24,6 @@ import HscTypes ( NameCache(..), HscEnv(..), GenAvailInfo(..),
IfaceExport, OrigNameCache )
import Type ( mkOpenTvSubst, substTy )
import TyCon ( TyCon, tyConName )
import Unify ( TypeRefinement )
import DataCon ( dataConWorkId, dataConName )
import Var ( TyVar, Id, varName, setIdType, idType )
import Name ( Name, nameUnique, nameModule,
......@@ -294,14 +293,6 @@ tcIfaceLclId occ
Nothing -> failIfM (text "Iface id out of scope: " <+> ppr occ)
}
refineIfaceIdEnv :: TypeRefinement -> IfL a -> IfL a
refineIfaceIdEnv (tv_subst, _) thing_inside
= do { env <- getLclEnv
; let { id_env' = mapOccEnv refine_id (if_id_env env)
; refine_id id = setIdType id (substTy subst (idType id))
; subst = mkOpenTvSubst tv_subst }
; setLclEnv (env { if_id_env = id_env' }) thing_inside }
extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
extendIfaceIdEnv ids thing_inside
= do { env <- getLclEnv
......
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