Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Tying the knot (Heinrich Apfelmus)
   2.  QuickCheck documentation (Christian Maeder)
   3. Re:  QuickCheck documentation (Stephen Tetley)


----------------------------------------------------------------------

Message: 1
Date: Wed, 05 Jan 2011 14:55:19 +0100
From: Heinrich Apfelmus <[email protected]>
Subject: Re: [Haskell-beginners] Tying the knot
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

aditya siram wrote:
> My brain turns into strange braid when I see this kind of thing. I
> don't quite understand it and I've never used it in real world code
> but I'll try and explain anyway. Caveat emptor.
> 
> [..]
> 
> Now look at 'n' and imagine it was a memory location. Mentally
> substitute some hex address (like 0x0000) if it makes it easier.

Another way to look at it is to observe that the result  n  does not 
depend on the input  n , even though the notation might suggest otherwise.

To see that, let  _|_  denote an expression that is  undefined , i.e. 
raises an error when you try to evaluate at it. Using the definition

     data Tree a = Branch (Tree a) (Tree a) | Leaf a

     label n (Branch a b) = (na+nb, Branch a' b')
         where
         (na,a') = label n a
         (nb,b') = label n b
     label n (Leaf _)     = (1, Leaf n)

we have

     label _|_ (Branch (Leaf 'c') (Leaf 'd'))
   = (na+nb, Branch a' b')
     where (na,a') = label _|_ (Leaf 'c')
           (nb,b') = label _|_ (Leaf 'd')
   = (1+1, Branch (Leaf _|_) (Leaf _|_))

So, even though the argument  n  is undefined, the function  label 
still produces a partially defined result.



Regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com




------------------------------

Message: 2
Date: Wed, 05 Jan 2011 18:07:10 +0100
From: Christian Maeder <[email protected]>
Subject: [Haskell-beginners] QuickCheck documentation
To: [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

Hi,

where can I find the best documentation for using QuickCheck?

I use version QuickCheck-2.1.1.1 that is in the current Haskell Platform
2010.2.0.0.

Thanks Christian

(The links to home pages
http://www.cse.chalmers.se/~koen
http://www.math.chalmers.se/~rjmh/QuickCheck/
are pretty dead.)




------------------------------

Message: 3
Date: Wed, 5 Jan 2011 18:16:09 +0000
From: Stephen Tetley <[email protected]>
Subject: Re: [Haskell-beginners] QuickCheck documentation
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

The first QuickCheck paper works as a tutorial although there are some
changes in QuickCheck2 that are slightly incompatible.

Papers that the author made available but where the home page has
disappeared are often on CiteSeer or KFUPM - King Fahd University of
Petroleum and Minerals. KFUPM seems to be more reliable than CiteSeer
these days:

http://reference.kfupm.edu.sa/


A Lightweight Tool for Random Testing of Haskell Programs

http://reference.kfupm.edu.sa/content/q/u/quickcheck__a_lightweight_tool_for_rando_73653.pdf

A bit more advanced :

http://reference.kfupm.edu.sa/content/t/e/testing_monadic_code_with_quickcheck_69509.pdf



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 31, Issue 3
****************************************

Reply via email to