
7 Mar
2009
7 Mar
'09
2:28 p.m.
Hi, When reading this code in ghci, I get an ambiguous type at last line: {-# LANGUAGE PolymorphicComponents #-} {-# LANGUAGE RankNTypes #-} import Graphics.UI.Gtk data Test = Test (forall w. WidgetClass w => w) toAction (Test w) = toWidget w It's interesting that if I replace 'Integral' for 'WidgetClass' and 'toInteger' for 'toWidget', I get no error messages, and I see no essencial diference between both classes and both functions. Do you know what am I missing? Thanks, Maurício