[Haskell-beginners] Can fields in a record be optional?

Mats Rauhala mats.rauhala at gmail.com
Wed Jul 20 14:07:24 CEST 2011


On 18:18 Sun 17 Jul     , 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 example:
> 
> urContract = Contract { currency = undefined, payments = undefined, contracts = [] }

Out of curiosity, what's the etymology for your 'ur'?

-- 
Mats Rauhala
MasseR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110720/fa0bdf8e/attachment.pgp>


More information about the Beginners mailing list