Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This is essentially show-type adapted to work
with GHC 9.4. The unfortunate thing is, GHC 9.4 conflates Type
and Constraint
for the purpose
of instance overlap, but not instance resolution, hence we have to use an overlappable
kind-polymorphic "catch-all" instance instead of the more specific Constraint
-kinded one.
See https://gitlab.haskell.org/ghc/ghc/-/issues/23446, https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0032-constraint-vs-type.rst, https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0518-type-vs-constraint.rst for more information.
There is an argument for eventually upstreaming this, but it's small enough to bundle in-tree, and time constraints on our side are pretty tight at the time of writing.
Showtype
class Showtype (a :: k) where Source #
Instances
KnownNat n => Showtype (n :: Nat) Source # | |
Showtype 'EQ Source # | |
Showtype 'GT Source # | |
Showtype 'LT Source # | |
Showtype '() Source # | |
Showtype 'False Source # | |
Showtype 'True Source # | |
KnownSymbol s => Showtype (s :: Symbol) Source # | |
Typeable a => Showtype (a :: k) Source # | |
Showtype ('Nothing :: Maybe a) Source # | |
Showtype ('[] :: [k]) Source # | |
Showtype a2 => Showtype ('Just a2 :: Maybe a1) Source # | |
(Showtype a, Showlisttype as) => Showtype (a ': as :: [k]) Source # | |
Showtype a2 => Showtype ('Left a2 :: Either a1 b) Source # | |
Showtype a2 => Showtype ('Right a2 :: Either a1 b) Source # | |
(Showtype a, Showtype b) => Showtype ('(a, b) :: (k1, k2)) Source # | |
(Showtype a, Showtype b, Showtype c) => Showtype ('(a, b, c) :: (k1, k2, k3)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d) => Showtype ('(a, b, c, d) :: (k1, k2, k3, k4)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d, Showtype e) => Showtype ('(a, b, c, d, e) :: (k1, k2, k3, k4, k5)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d, Showtype e, Showtype f) => Showtype ('(a, b, c, d, e, f) :: (k1, k2, k3, k4, k5, k6)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d, Showtype e, Showtype f, Showtype g) => Showtype ('(a, b, c, d, e, f, g) :: (k1, k2, k3, k4, k5, k6, k7)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d, Showtype e, Showtype f, Showtype g, Showtype h) => Showtype ('(a, b, c, d, e, f, g, h) :: (k1, k2, k3, k4, k5, k6, k7, k8)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d, Showtype e, Showtype f, Showtype g, Showtype h, Showtype i) => Showtype ('(a, b, c, d, e, f, g, h, i) :: (k1, k2, k3, k4, k5, k6, k7, k8, k9)) Source # | |
(Showtype a, Showtype b, Showtype c, Showtype d, Showtype e, Showtype f, Showtype g, Showtype h, Showtype i, Showtype j) => Showtype ('(a, b, c, d, e, f, g, h, i, j) :: (k1, k2, k3, k4, k5, k6, k7, k8, k9, k10)) Source # | |