summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-09-05 09:38:50 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-09-05 09:38:50 +0100
commit8595c61cfae514bc9582d4447ccca5db5a201133 (patch)
treec27b710cf1cceb07a3679e07a71255dfd3df7c16 /compiler
parent69ecb07c635336b25fa4fc068424d4343db85549 (diff)
downloadhaskell-8595c61cfae514bc9582d4447ccca5db5a201133.tar.gz
Eliminate isHiBootTyCon in favour of isAbstractTyCon
Fixes Trac #5456, which was a buglet arising from commit de9b85fa3fb6d4cd593366e1f2383cd0b492c056 Author: Simon Peyton Jones <simonpj@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!
Diffstat (limited to 'compiler')
-rw-r--r--compiler/stgSyn/CoreToStg.lhs6
-rw-r--r--compiler/typecheck/TcTyDecls.lhs2
-rw-r--r--compiler/types/TyCon.lhs7
3 files changed, 4 insertions, 11 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs
index 9d555f12c5..bd4e0ae6bd 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 15c817a657..347e2b705e 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 e7e068c676..560fadf63f 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