[Haskell-cafe] typeclass constraints?

Gregory Guthrie guthrie at mum.edu
Sat Nov 5 21:01:41 UTC 2016


Yes – I could move the show() back to the test definitions.
This was also mostly/partly to better understand how to do this.

Thanks.


From: Brandon Allbery [mailto:allbery.b at gmail.com]
Sent: Saturday, November 5, 2016 3:51 PM
To: Gregory Guthrie <guthrie at mum.edu>
Cc: haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] typeclass constraints?


On Sat, Nov 5, 2016 at 3:09 PM, Gregory Guthrie <guthrie at mum.edu<mailto:guthrie at mum.edu>> wrote:
So each test is of type: (String, value), for various value types all of which (only) have to be members of the Show class.

Had you considered [(String, String)]? Remember that Haskell is lazy; it's not going to evaluate those expressions until their values are needed for e.g. I/O.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com<mailto:allbery.b at gmail.com>                                  ballbery at sinenomine.net<mailto:ballbery at sinenomine.net>
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161105/c0dff3a2/attachment.html>


More information about the Haskell-Cafe mailing list