
15 Oct
2010
15 Oct
'10
6:47 p.m.
-- Given a definition of view which is essentially a synonym for show: class View a where view :: a -> String instance View Int where view = show -- why does "show 2" compile, while "view 2" gives an -- 'Ambiguous type variable' error fine = view (2::Int) noProblem = show 2 ambiguousTypeVariable = view 2