summaryrefslogtreecommitdiff
path: root/testsuite/tests/unsatisfiable/UnsatisfiableFail4.hs
blob: 070c621d4e4a08269697962b1a188cd5cf0ba7d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE DataKinds, PartialTypeSignatures #-}

module UnsatisfiableFail4 where

import GHC.TypeError

data D = MkD

-- Check that we don't try to solve errors in kinds using Unsatisfiable.

instance Unsatisfiable (Text "msg") => Eq D where
  _ == _ = let y :: Maybe Maybe
               y = unsatisfiable
           in unsatisfiable

instance Unsatisfiable (Text "msg") => Ord D where
  compare _ _
    = let y :: _ => Maybe Maybe
          y = unsatisfiable
      in unsatisfiable