blob: 6b5462e553b195a066b347a76b99c249fdab9e4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module T13487 where
import Data.Kind (Constraint)
import GHC.TypeLits
data Foo a b where
K :: Error a b => a -> b -> Foo a b
type family Error a b :: Constraint where
Error Int Int = ()
Error _ _ = TypeError ('Text "GHC panic in 3... 2... 1...")
foo = K 'a' 'b'
|