9 Feb
2012
9 Feb
'12
4:25 a.m.
Hi, The following program is accepted by GHC 7 with -XRank2Types: class C a where f :: a -> a newtype R = R (forall a . C a => a) instance C R where f (R x) = R $ f x main = return () jhc 0.8 gives the following error: [1 of 1] Main (...............jhci: user error ( What: failure Why: Signature too Weak: [] does not imply [Main.C Main.v11] Where: on line 7 in j.hs in the explicitly typed Instance@.iMain.f.Main.R (Main.R Main.6_x) = Main.R Jhc.Basics.$ Main.f Main.6_x {- on line 7 -} Compilation of module: Main) Is this difference in behaviour intended, and how can I make something like that compile? -- Roman I. Cheplyaka :: http://ro-che.info/