Hi! I usually use the function 'sized' for this. The function would look
something like this:
myIntGen :: Gen Int
myIntGen = sized $ \n -> choose (0,f n)
where 'f' is a function that uses the size value to generate an upper value
for your random range. I usually use ^2 or sqrt or something like t
On 25 July 2011 14:31, Mark Spezzano wrote:
> Hi Kevin,
>
> Thanks for the response. The first part works well with minor modifications.
>
> Part 2 is still a bit vague to me. I basically want to "clamp" the Integers
> generated within the Queue to between 0 and some positive number. At present
Hi Kevin,
Thanks for the response. The first part works well with minor modifications.
Part 2 is still a bit vague to me. I basically want to "clamp" the Integers
generated within the Queue to between 0 and some positive number. At present
they're giving me numbers all over the place (specific
On Sun, 24 Jul 2011 07:30:56 -0700, Mark Spezzano
wrote:
Hi all,
I would appreciate it if someone can point me in the right direction
with the following problem.
I'm deliberately implementing a naive Queues packages that uses finite
lists as the underlying representation. I've already
Hi all,
I would appreciate it if someone can point me in the right direction with the
following problem.
I'm deliberately implementing a naive Queues packages that uses finite lists as
the underlying representation. I've already read through Hughes' paper and the
article in The Fun of Programm
Pasqualino "Titto" Assini skrev:
Fantastic.
If I understand correctly it inductively derives equations that hold
for a set of examples.
AFAIU, it enumerates a set of terms and uses random testing to
approximate an equivalence relation for these. The real trick,
apparently, is in filtering ou
Fantastic.
If I understand correctly it inductively derives equations that hold
for a set of examples.
I am looking forward to see it in Haskell, who is working on the port?
titto
2009/9/28 Emil Axelsson :
> Not sure this is what you want, but I thought I'd mention "Formal
> Specifications
On Mon, 2009-09-28 at 23:59 +0900, Yusaku Hashimoto wrote:
> After a few more investigations, I can say
>
> QuickCheck does:
> - make easy to finding couter-cases and refactoring codes
> - make easy to test some functions if they have good mathematical properties
> - generate random test cases
>
Not sure this is what you want, but I thought I'd mention "Formal
Specifications for Free":
http://www.erlang.org/euc/08/1005Hughes2.pdf
(I wasn't able to find a better link. That talk is for Erlang, but
people are working on this for Haskell QuickCheck.)
/ Emil
Yusaku Hashimoto skrev:
On Mon, Sep 28, 2009 at 10:59 AM, Yusaku Hashimoto wrote:
After a few more investigations, I can say
QuickCheck does:
- make easy to finding couter-cases and refactoring codes
- make easy to test some functions if they have good mathematical properties
- generate random test cases
But QuickChe
After a few more investigations, I can say
QuickCheck does:
- make easy to finding couter-cases and refactoring codes
- make easy to test some functions if they have good mathematical properties
- generate random test cases
But QuickCheck does *not*:
- help us to find good properties
So what I w
On Mon, Sep 28, 2009 at 4:42 AM, Gwern Branwen wrote:
> On Sun, Sep 27, 2009 at 3:19 PM, Yusaku Hashimoto
> wrote:
> ...
>>
>> Do you think I wasted times? Have you ever tried PDD? And has it
>> worked? If you have experience with TDD, how do you think about PDD?
>>
>> If you have any answers in
On Sun, Sep 27, 2009 at 3:19 PM, Yusaku Hashimoto wrote:
...
Do you think I wasted times? Have you ever tried PDD? And has it
worked? If you have experience with TDD, how do you think about PDD?
If you have any answers in any questions above, please tell me them.
Thanks in advance.
Cheers
-nwn
Hello, I recently worked with QuickCheck for a while, But I still
can't handle it well, And a few questions come to my mind.
1. How to find properties
In QuickCheck examples on the codes or the papers, they find good
properties easily. How did they find these properties? What property
can make u
14 matches
Mail list logo