Type checker infers () instead of a
A small module loaded into ghci -fglasgow-exts 6.4.1:
module M where
class C a b | a -> b where
same :: a -> b
instance C () ()
instance C a b => C (c -> a) (c -> b)
foo = same (const ())
Asking :i foo yields
foo :: () -> ()
I would expect a -> ()
-- what gives?
John Hughes