Ticket #1564: MoreBugs.hs

File MoreBugs.hs, 507 bytes (added by iampure@…, 7 years ago)

File containing variable y for ghci derives the wrong type.

Line 
1{-# OPTIONS -fno-monomorphism-restriction -fglasgow-exts -fallow-undecidable-instances #-}
2-- The Glorious Glasgow Haskell Compilation System, version 6.7.20070712
3import Text.PrettyPrint
4import Prelude hiding(head,tail)
5
6class FooBar m k l | m -> k l where 
7 a :: m graphtype
8
9class (Monad m)=>Gr g ep m | g -> ep where 
10 x:: m Int
11 v:: m Int
12
13instance (Monad m,  FooBar m x z) =>  Gr g ep m  where
14-- GHCi claims for y:  y :: (Monad m, FooBar m GHC.Prim.Any GHC.Prim.Any) => m Int (which is wrong)
15y = x
16