
18 Jul
2011
18 Jul
'11
8:47 p.m.
Thanks for the pointer to Data.Default. I don't see how it applies in this case, though. The goal is to avoid mentioning the defaulted fields when constructing a record instance. Example? ____________________ David Place Owner, Panpipes Ho! LLC http://panpipesho.com d@vidplace.com On Jul 18, 2011, at 1:45 AM, Christopher Done wrote:
On 18 July 2011 00:18, David Place
wrote: The way I often do this is to create an "ur" instance where all the fields have default values. Then to create an instance, I just do a "record update" of this instance.
For this there is Data.Default in data-default:
http://hackage.haskell.org/packages/archive/data-default/0.2.0.1/doc/html/Da...