diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-05-23 09:42:12 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-05-23 10:57:29 -0400 |
commit | 6166b59fadb8714cd497902c8469fd2b3b6caf46 (patch) | |
tree | 6743a2e676c72a8f205cb3785b1d46975c5ab6f6 /libraries | |
parent | 107601058b6189521c379f7ed7a2b0694792acbf (diff) | |
download | haskell-6166b59fadb8714cd497902c8469fd2b3b6caf46.tar.gz |
base: Fix a few TODOs in Typeable.Internal
Test Plan: Validate
Reviewers: austin, hvr, dfeuer
Reviewed By: dfeuer
Subscribers: rwbarton, thomie
GHC Trac Issues: #13746
Differential Revision: https://phabricator.haskell.org/D3605
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Typeable/Internal.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs index 48da8ddc94..cf645ad3f1 100644 --- a/libraries/base/Data/Typeable/Internal.hs +++ b/libraries/base/Data/Typeable/Internal.hs @@ -187,9 +187,6 @@ data TypeRep (a :: k) where -> TypeRep b -> TypeRep (a -> b) -on :: (a -> a -> r) -> (b -> a) -> (b -> b -> r) -on f g = \ x y -> g x `f` g y - -- Compare keys for equality -- | @since 2.01 @@ -207,7 +204,8 @@ instance TestEquality TypeRep where -- | @since 4.4.0.0 instance Ord (TypeRep a) where - compare = compare `on` typeRepFingerprint + compare _ _ = EQ + {-# INLINABLE compare #-} -- | A non-indexed type representation. data SomeTypeRep where @@ -305,11 +303,11 @@ someTypeRepTyCon (SomeTypeRep t) = typeRepTyCon t typeRepTyCon :: TypeRep a -> TyCon typeRepTyCon (TrTyCon _ tc _) = tc typeRepTyCon (TrApp _ a _) = typeRepTyCon a -typeRepTyCon (TrFun _ _ _) = error "typeRepTyCon: FunTy" -- TODO +typeRepTyCon (TrFun _ _ _) = typeRepTyCon $ typeRep @(->) -- | Type equality -- --- @since TODO +-- @since 4.10 eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> Maybe (a :~~: b) eqTypeRep a b |