Commit 8f2f4e87 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add test for Trac #1564

parent c49f83ac
......@@ -247,6 +247,7 @@ test('tc231', normal, compile, [''])
test('tc232', reqlib('mtl'), compile, [''])
test('tc233', normal, compile, [''])
test('tc234', normal, compile, [''])
test('tc235', normal, compile, [''])
test('faxen', normal, compile, [''])
{-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
-- Trac #1564
module Foo where
import Text.PrettyPrint
import Prelude hiding(head,tail)
class FooBar m k l | m -> k l where
a :: m graphtype
instance FooBar [] Bool Bool where
a = error "urk"
instance FooBar Maybe Int Int where
a = error "urk"
class (Monad m)=>Gr g ep m | g -> ep where
x:: m Int
v:: m Int
instance (Monad m, FooBar m x z) => Gr g ep m where
x = error "urk"
v = error "urk"
-- Old GHC claims for y: y :: (Monad m, FooBar m GHC.Prim.Any GHC.Prim.Any)
-- => m Int (which is wrong)
-- The uses in foo and bar show if that happens
y () = x
foo :: [Int]
foo = y ()
bar :: Maybe Int
bar = y ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment