Frege / frege

Frege is a Haskell for the JVM. It brings purely functional programing to the Java platform.
https://github.com/Frege/frege/wiki/_pages
Other
3.64k stars 145 forks source link

wiki page "getting started", quickcheck section #114

Closed Dierk closed 9 years ago

Dierk commented 9 years ago

pasting the mentioned code into the online repl gives

frege> import frege.tools.Quick
3: unused import of  frege.tools.Quick  as  Quick
frege> p_test = property $ \(n::Integer) -> odd n ^^ even n
4: syntax error, a where clause cannot start with '='
Ingo60 commented 9 years ago

It was no mention of the repl there. If you want to do that in the repl, you must import QuickCheck, not the Quick tool, just like in the example module.

Dierk commented 9 years ago

ah, true. But others may do the same error. So we better say what to import...

Ingo60 commented 9 years ago

Yes, sure. But the answer would be the same: just look up how the code does it. Remember, this is not "Getting a QuickCheck expert", and if you do

import Test.QuickCheck
p_test = property $ \(n::Integer) -> odd n ^^ even n

what then? The property is just there, but nothing happens. So we had to explain how to actually check it, like

quickCheck p_test

But then the next complainant comes and asks how he can see the values the property was tested with. And so on.

To be sure, all those questions are per se ok, and worth an answer, it's just way beyond the Getting Started topic, IMHO.

Dierk commented 9 years ago

The feedback "I would like to hear more about this topic" is the best that one can get.

Whereas "the code doesn't compile" is not so good. ;-)

Am 07.03.2015 um 01:20 schrieb Ingo Wechsung notifications@github.com:

Yes, sure. But the answer would be the same: just look up how the code does it. Remember, this is not "Getting a QuickCheck expert", and if you do

import Test.QuickCheck p_test = property $ (n::Integer) -> odd n ^^ even n

what then? The property is just there, but nothing happens. So we had to explain how to actually check it, like

quickCheck p_test

But then the next complainant comes and asks how he can see the values the property was tested with. And so on.

To be sure, all those questions are per se ok, and worth an answer, it's just way beyond the Getting Started topic, IMHO.

— Reply to this email directly or view it on GitHub.

Ingo60 commented 9 years ago

No doubt abaout that.

But that doesn't mean that we can address any possible upcoming question in the "Getting Started" wiki page.