Improve error messages around kind mismatches.
[ghc.git] / testsuite / tests / typecheck / should_fail / T13487.hs
1 {-# LANGUAGE DataKinds #-}
2 {-# LANGUAGE GADTs #-}
3 {-# LANGUAGE TypeFamilies #-}
4 {-# LANGUAGE UndecidableInstances #-}
5 {-# OPTIONS_GHC -fdefer-type-errors #-}
6
7 module T13487 where
8
9 import Data.Kind (Constraint)
10 import GHC.TypeLits
11
12 data Foo a b where
13 K :: Error a b => a -> b -> Foo a b
14
15 type family Error a b :: Constraint where
16 Error Int Int = ()
17 Error _ _ = TypeError ('Text "GHC panic in 3... 2... 1...")
18
19 foo = K 'a' 'b'