Implement support for user-defined type errors.
[ghc.git] / testsuite / tests / typecheck / should_fail / CustomTypeErrors01.hs
1 {-# LANGUAGE DataKinds, UndecidableInstances #-}
2 module T1 where
3 import GHC.TypeLits
4
5
6 data MyType = MyType
7
8 instance
9 TypeError (Text "Values of type 'MyType' cannot be compared for equality.")
10 => Eq MyType where (==) = undefined
11
12 err x = x == MyType
13
14