Brian Hulley wrote:
Bulat Ziganshin wrote:
f :: Num a => a -> Int
write as
f :: Num -> Int
Actually separating the class namespace from the tycon namespace would allow
you to get a very similar effect to the use of abstract interfaces in C++
ie:
class Object a where
name :: a -> Unique
-- generated automatically?
data Object = forall a. Object a
-- general version
foo :: Object a => a -> Unique
-- to use with the standard Object wrapper
foo :: Object -> Unique
Regards, Brian.
--
Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us.
http://www.metamilk.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe