blob: ce4bfe632fc5b21b7d9be210419edbee528363ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE TypeFamilies, FlexibleInstances, DataKinds, UndecidableInstances #-}
import GHC.TypeLits
data C = A | B
class Err (a :: C)
instance (TypeError ('Text "uh-oh")) => Err 'A
instance Err 'B
|