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

Antoine Latter aslatter at gmail.com
Wed Jul 20 14:35:58 CEST 2011


I would expect I would run into trouble with this approach - when a function
receives one of these records as an argument, how does it know if it is safe
to acces the record fields in question?

I would prefer using Maybe types, different types altogether for summed
contracts, or imaking a Contract a type with two cases (as suggested
earlier).
On Jul 17, 2011 5:19 PM, "David Place" <d at vidplace.com> wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110720/426b16a6/attachment.htm>


More information about the Beginners mailing list