Skip to content

Typeable changes in base-4.10 break ChasingBottoms's test suite

When compiled against base-4.10, ChasingBottoms's test suite fails with:

Approx:
ChasingBottomsTestSuite: typeRepTyCon: FunTy
CallStack (from HasCallStack):
  error, called at libraries/base/Data/Typeable/Internal.hs:308:33 in base:Data.Typeable.Internal

This is due to the use of error in the following function in `Data.Typeable.Internal`:

-- | Observe the type constructor of a type representation
typeRepTyCon :: TypeRep a -> TyCon
typeRepTyCon (TrTyCon _ tc _) = tc
typeRepTyCon (TrApp _ a _)    = typeRepTyCon a
typeRepTyCon (TrFun _ _ _) = error "typeRepTyCon: FunTy" -- TODO

ChasingBottoms's test suite works fine when compiled with GHC 8.0.2. It seems to me that the change in behaviour constitutes a bug or a breaking change (for which there is no mention in the changelog).

Trac metadata
Trac field Value
Version 8.2.1-rc2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information