[commit: ghc] ghc-8.2: base: Fix a few TODOs in Typeable.Internal (979cc34)
git at git.haskell.org
git at git.haskell.org
Tue May 23 23:47:42 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/979cc34b03909939c007e7b719687362dbfdf153/ghc
>---------------------------------------------------------------
commit 979cc34b03909939c007e7b719687362dbfdf153
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue May 23 09:42:12 2017 -0400
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
(cherry picked from commit 6166b59fadb8714cd497902c8469fd2b3b6caf46)
>---------------------------------------------------------------
979cc34b03909939c007e7b719687362dbfdf153
libraries/base/Data/Typeable/Internal.hs | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index 48da8dd..cf645ad 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
More information about the ghc-commits
mailing list