[Haskell-beginners] How do I use Guards in record syntax?

Kim-Ee Yeoh ky3 at atamo.com
Mon Apr 14 11:22:13 UTC 2014

On Mon, Apr 14, 2014 at 1:03 PM, Dimitri DeFigueiredo <
defigueiredo at ucdavis.edu> wrote:

>     oldbuysell :: String  -- "buy", "sell" or ""

Why is this String when you've defined the perfectly cromulent BuyOrSell

How can you be sure there won't be some accidental buggy code that sets the
field to "buyy"?

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140414/976a45f9/attachment.html>

More information about the Beginners mailing list