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

HASHIMOTO, Yusaku nonowarn at gmail.com
Thu May 13 19:16:07 EDT 2010


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.

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

On 14 May 2010 07:58, HASHIMOTO, Yusaku <nonowarn at gmail.com> wrote:
> On 11 May 2010 03:25, adam vogt <vogt.adam at gmail.com> wrote:
>> On Tue, May 4, 2010 at 12:18 PM, HASHIMOTO, Yusaku <nonowarn at gmail.com> wrote:
>>> This library is inspired by HList[2], and interfaces are stealed from
>>> data-accessors[3]. And lenses[4], fclabels[5], and records[6] devote
>>> themselves to similar purposes.
>>>
>>> [2]: http://hackage.haskell.org/package/HList
>>> [3]: http://hackage.haskell.org/package/data-accessor
>>> [4]: http://hackage.haskell.org/package/lenses
>>> [5]: http://hackage.haskell.org/package/fclabels
>>> [6]: http://hackage.haskell.org/package/records
>>>
>>> Enjoy!
>>>
>>> -nwn
>>
>> Which niche does `has' fit between extensible (and more complicated)
>> records like HList and records vs the libraries that provide only
>> accessors?
>
> You may find `has' useful when you want to use a label name in more
> than one record structures. This is achieved by HList, records and
> wreckage, But I think has at its interface.
>


More information about the Haskell-Cafe mailing list