[Haskell-beginners] Conciseness question

Brandon Allbery allbery.b at gmail.com
Sun Aug 7 18:43:42 CEST 2011


On Sun, Aug 7, 2011 at 07:25, Manfred Lotz <manfred.lotz at arcor.de> wrote:

> -- initialize empty table
> P = {}
>
> P.a = "bla1"
> P.b = "bla2"
>
> and so on.
>
> Now I can refer to each value by name, and I also can easily iterate
> over the table P.
>

This looks to me like one of the HList-based record systems.  But that could
get you into hot water fairly quickly, as while the record/lens packages try
to cover up the ugliness, it's all based on some fairly complex type
hackery.

http://www.haskell.org/haskellwiki/Extensible_record is an overview of the
field.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110807/48b9f5cc/attachment.htm>


More information about the Beginners mailing list