Commit bdba6ac2 authored by Vladislav Zavialov's avatar Vladislav Zavialov Committed by Marge Bot
Browse files

Do not rely on CUSKs in 'base'

Use standalone kind signatures instead of complete user-specified kinds
in Data.Type.Equality and Data.Typeable
parent b36dd49b
Pipeline #10758 failed with stages
in 588 minutes and 10 seconds
......@@ -12,6 +12,7 @@
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
......@@ -122,7 +123,8 @@ deriving instance a ~ b => Bounded (a :~: b)
-- inhabited by a terminating value if and only if @a@ is the same type as @b@.
--
-- @since 4.10.0.0
data (a :: k1) :~~: (b :: k2) where
type (:~~:) :: k1 -> k2 -> Type
data a :~~: b where
HRefl :: a :~~: a
-- | @since 4.10.0.0
......@@ -163,7 +165,8 @@ instance TestEquality ((:~~:) a) where
infix 4 ==
-- | A type family to compute Boolean equality.
type family (a :: k) == (b :: k) :: Bool where
type (==) :: k -> k -> Bool
type family a == b where
f a == g b = f == g && a == b
a == a = 'True
_ == _ = 'False
......
......@@ -18,6 +18,7 @@
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneKindSignatures #-}
-----------------------------------------------------------------------------
-- |
......@@ -178,7 +179,8 @@ rnfTyCon (TyCon _ _ m n _ k) = rnfModule m `seq` rnfTrName n `seq` rnfKindRep k
-- | A concrete representation of a (monomorphic) type.
-- 'TypeRep' supports reasonably efficient equality.
data TypeRep (a :: k) where
type TypeRep :: k -> Type
data TypeRep a where
-- The TypeRep of Type. See Note [Kind caching], Wrinkle 2
TrType :: TypeRep Type
TrTyCon :: { -- See Note [TypeRep fingerprints]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment