Don't skip validity checks for built-in classes (#17355)
[ghc.git] / testsuite / tests / typecheck / should_fail / T5236.hs
1 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}
2
3 module T5236 where
4
5 data A
6 data B
7
8 class Id a b | a -> b, b -> a
9
10 instance Id A A
11 instance Id B B
12
13 -- The fundeps mean that this type signature
14 -- has a (derived) insoluble Given, A~B, but
15 -- we now ignore that (#12466)
16 loop :: Id A B => Bool
17 loop = True
18
19 -- f :: Bool
20 -- f = loop