Let parseModule take a ModSummary like checkAndLoadModule did.
[ghc-hetmet.git] / compiler / iface / MkIface.lhs
index f953107..1346a9a 100644 (file)
@@ -303,7 +303,7 @@ mkIface_ hsc_env maybe_old_fingerprint
                                     , isNothing (ifRuleOrph r) ]
 
        ; when (not (isEmptyBag orph_warnings))
-              (do { printErrorsAndWarnings dflags errs_and_warns
+              (do { printErrorsAndWarnings dflags errs_and_warns -- XXX
                   ; when (errorsFound dflags errs_and_warns) 
                          (exitWith (ExitFailure 1)) })
 
@@ -426,7 +426,7 @@ addFingerprints hsc_env mb_old_fingerprint iface0 new_decls
                   where n = ifName d
 
         -- strongly-connected groups of declarations, in dependency order
-       groups = stronglyConnComp edges
+       groups = stronglyConnCompFromEdgedVertices edges
 
        global_hash_fn = mkHashFun hsc_env eps
 
@@ -1290,8 +1290,8 @@ tyThingToIfaceDecl (ATyCon tycon)
   | isSynTyCon tycon
   = IfaceSyn { ifName    = getOccName tycon,
                ifTyVars  = toIfaceTvBndrs tyvars,
-               ifOpenSyn = syn_isOpen,
-               ifSynRhs  = toIfaceType syn_tyki,
+               ifSynRhs  = syn_rhs,
+               ifSynKind = syn_ki,
                 ifFamInst = famInstToIface (tyConFamInst_maybe tycon)
              }
 
@@ -1312,9 +1312,10 @@ tyThingToIfaceDecl (ATyCon tycon)
   | otherwise = pprPanic "toIfaceDecl" (ppr tycon)
   where
     tyvars = tyConTyVars tycon
-    (syn_isOpen, syn_tyki) = case synTyConRhs tycon of
-                              OpenSynTyCon ki _ -> (True , ki)
-                              SynonymTyCon ty   -> (False, ty)
+    (syn_rhs, syn_ki) 
+       = case synTyConRhs tycon of
+           OpenSynTyCon ki _ -> (Nothing,               toIfaceType ki)
+           SynonymTyCon ty   -> (Just (toIfaceType ty), toIfaceType (typeKind ty))
 
     ifaceConDecls (NewTyCon { data_con = con })     = 
       IfNewTyCon  (ifaceConDecl con)