Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8595c61cfae514bc9582d4447ccca5db5a201133

>---------------------------------------------------------------

commit 8595c61cfae514bc9582d4447ccca5db5a201133
Author: Simon Peyton Jones <simo...@microsoft.com>
Date:   Mon Sep 5 09:38:50 2011 +0100

    Eliminate isHiBootTyCon in favour of isAbstractTyCon
    
    Fixes Trac #5456, which was a buglet arising from
    
      commit de9b85fa3fb6d4cd593366e1f2383cd0b492c056
      Author: Simon Peyton Jones <simo...@microsoft.com>
      Date:   Fri Sep 2 17:43:53 2011 +0100
    
        Export a tiny bit more info with AbstractTyCon (fixes #5424)
    
    It only shows up when compiling with -O0!

>---------------------------------------------------------------

 compiler/stgSyn/CoreToStg.lhs    |    6 +++---
 compiler/typecheck/TcTyDecls.lhs |    2 +-
 compiler/types/TyCon.lhs         |    7 -------
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs
index 9d555f1..bd4e0ae 100644
--- a/compiler/stgSyn/CoreToStg.lhs
+++ b/compiler/stgSyn/CoreToStg.lhs
@@ -436,7 +436,7 @@ mkStgAltType bndr alts
   = case tyConAppTyCon_maybe (repType (idType bndr)) of
         Just tc | isUnboxedTupleTyCon tc -> UbxTupAlt tc
                 | isUnLiftedTyCon tc     -> PrimAlt tc
-                | isHiBootTyCon tc       -> look_for_better_tycon
+                | isAbstractTyCon tc     -> look_for_better_tycon
                 | isAlgTyCon tc          -> AlgAlt tc
                 | otherwise              -> ASSERT2( _is_poly_alt_tycon tc, 
ppr tc )
                                             PolyAlt
@@ -450,8 +450,8 @@ mkStgAltType bndr alts
                             -- function application where argument has a
                             -- type-family type
 
-   -- Sometimes, the TyCon is a HiBootTyCon which may not have any
-   -- constructors inside it.  Then we can get a better TyCon by
+   -- Sometimes, the TyCon is a AbstractTyCon which may not have any
+   -- constructors inside it.  Then we may get a better TyCon by
    -- grabbing the one from a constructor alternative
    -- if one exists.
    look_for_better_tycon
diff --git a/compiler/typecheck/TcTyDecls.lhs b/compiler/typecheck/TcTyDecls.lhs
index 15c817a..347e2b7 100644
--- a/compiler/typecheck/TcTyDecls.lhs
+++ b/compiler/typecheck/TcTyDecls.lhs
@@ -217,7 +217,7 @@ back to it.  (This is an error too.)
 Hi-boot types
 ~~~~~~~~~~~~~
 A data type read from an hi-boot file will have an AbstractTyCon as its 
AlgTyConRhs
-and will respond True to isHiBootTyCon. The idea is that we treat these as if 
one
+and will respond True to isAbstractTyCon. The idea is that we treat these as 
if one
 could get from these types to anywhere.  So when we see
 
         module Baz where
diff --git a/compiler/types/TyCon.lhs b/compiler/types/TyCon.lhs
index e7e068c..560fadf 100644
--- a/compiler/types/TyCon.lhs
+++ b/compiler/types/TyCon.lhs
@@ -48,7 +48,6 @@ module TyCon(
        isGadtSyntaxTyCon, isDistinctTyCon, isDistinctAlgRhs,
        isTyConAssoc, tyConAssoc_maybe,
        isRecursiveTyCon,
-       isHiBootTyCon,
         isImplicitTyCon, 
 
         -- ** Extracting information out of TyCons
@@ -1138,12 +1137,6 @@ isRecursiveTyCon :: TyCon -> Bool
 isRecursiveTyCon (AlgTyCon {algTcRec = Recursive}) = True
 isRecursiveTyCon _                                 = False
 
--- | Did this 'TyCon' originate from type-checking a .h*-boot file?
-isHiBootTyCon :: TyCon -> Bool
--- Used for knot-tying in hi-boot files
-isHiBootTyCon (AlgTyCon {algTcRhs = AbstractTyCon False}) = True
-isHiBootTyCon _                                           = False
-
 -- | Is this the 'TyCon' of a foreign-imported type constructor?
 isForeignTyCon :: TyCon -> Bool
 isForeignTyCon (PrimTyCon {tyConExtName = Just _}) = True



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to