[Haskell-cafe] ANN: has-0.4 Entity based records

adam vogt vogt.adam at gmail.com
Wed May 19 16:31:29 EDT 2010


On Thu, May 13, 2010 at 7:16 PM, HASHIMOTO, Yusaku <nonowarn at gmail.com> wrote:
> Sorry for spamming, what I wanted to write is I think `has' has better
> interface than other record packages in types.
>
> There are many libraries to write function "takes an record has Foo
> and Bar and returns something." But writing type of the function is
> still difficult. I can't write such types using HList or records
> without reading documents. I think, using has, There's few effort to
> write such types.

In which manner do you need to read less documentation to write:

] f :: Has Foo r => r -> ...

Instead when using HList:

] f :: HasField Foo record fieldType => ...


> I think `has' fits the needs of Haskellers who have the good habit of
> writing a type of a function before its definition.

What does this mean exactly in terms of the type inference possible?

--
Adam


More information about the Haskell-Cafe mailing list