Documentation for (&&) and (&&) states that they are lazy in their second argument...
[ghc.git] / testsuite / tests / typecheck / should_compile / FD4.hs
1 {-# LANGUAGE
2 MultiParamTypeClasses,
3 FunctionalDependencies,
4 UndecidableInstances,
5 FlexibleInstances,
6 EmptyDataDecls #-}
7
8 -- #1797
9
10 module ShouldCompile where
11
12 data True
13
14 data False
15
16 class TypeEq type1 type2 result | type1 type2 -> result where
17 typeEq :: type1 -> type2 -> result
18
19 instance TypeEq soleType soleType True where
20 typeEq _ _ = undefined
21
22 instance (TypeCast False result) => TypeEq type1 type2 result where
23 typeEq _ _ = undefined
24
25 class TypeCast type1 type2 | type1 -> type2, type2 -> type1
26
27 instance TypeCast soleType soleType