@@ -1,3 +1,8 @@
1+-- @shouldFailWith NoInstanceFound
3+-- See issue 438 for details: this test is mainly here to test that code like
4+-- this doesn't cause the compiler to loop.
1module Main where
6module Main where
3import Prelude
8import Prelude
@@ -5,7 +10,6 @@ import Prelude
5data Fix f = In (f (Fix f))
10data Fix f = In (f (Fix f))
7instance eqFix :: (Eq (f (Fix f))) => Eq (Fix f) where
12instance eqFix :: (Eq (f (Fix f))) => Eq (Fix f) where
8− (==) (In f) (In g) = f == g
13+ eq (In f) (In g) = f == g
9− (/=) a b = not (a == b)
11example = In [] == In []
15example = In [] == In []