summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T5236.hs
blob: f32c06dcdb97eef39eb73838f7493c64906a9fa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts  #-}

module T5236 where

data A
data B

class Id a b | a -> b, b -> a

instance Id A A
instance Id B B

-- The fundeps mean that this type signature
-- has a (derived) insoluble Given, A~B, but
-- we now ignore that (Trac #12466)
loop :: Id A B => Bool
loop = True

-- f :: Bool
-- f = loop