Yves Parès schrieb:
> I think this idea is a stairway to duck typing.
> I exagerate, of course, but here is my point:
> 
> It shouldn't be difficult to make a class:
> class HasName a where
>   name :: a -> String

or

class Name a where
  name :: Accessor a String

That gives you read and write access to a record.

I think type class based solutions should be implemented in packages and
tested in applications first, before adding another extension
(exclusively) to GHC.


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to