[Haskell-cafe] Generating random arguments for a function

Joachim Breitner mail at joachim-breitner.de
Sun Jan 13 17:14:32 CET 2013


Hi,

Am Sonntag, den 13.01.2013, 07:34 -0800 schrieb Bob Ippolito:
> I think it's more complicated because he doesn't know what the return
> type or arity of the function is. In QuickCheck they know the return
> type of a property is Bool. In this case, we only know that the return
> type is an instance of Show. I don't think that's enough to simply
> implement this. 

I posted on SE an answer that tries to do it with OverlappingInstances:
http://stackoverflow.com/questions/14294802/evaluating-function-at-random-arguments-using-quickcheck/14295179#14295179

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
  mail at joachim-breitner.de  |  nomeata at debian.org  |  GPG: 0x4743206C
  xmpp: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130113/2b4a080c/attachment.pgp>


More information about the Haskell-Cafe mailing list