[Haskell-cafe] Type Directed Name Resolution

Henning Thielemann schlepptop at henning-thielemann.de
Sun Nov 14 12:40:16 EST 2010

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


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.

More information about the Haskell-Cafe mailing list