-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build QuickCheck with random v1.2 #50
Comments
I think QuickCheck can use the old version of Hugs is pretty much dead, so I don't think it is something we need to concern our selves with. So the question should be: Are there any other Haskell compilers other than GHC we should support? I personally think there is no compelling reason for adding more complexity in order to support esoteric compilers. It is better to provide functionality for efficient creation of a chunk in memory filled with random data. Adding flags and CPP should be our last resort and I don't think that is a good enough reason for that. @curiousleo even your boss says that CPP is harmful :D I would rather spent more time into making older versions of ghc supported rather than wasting time on Haskell compilers that we aren't even planning on testing |
@lehins I think I agree. There is a problem though: if a project depends on Example:
Edit: perhaps Edit 2: relevant recent overview of property testing libraries: https://youtu.be/x-zxvTkapcU?t=337 |
I don't really see a problem here. Bounds will have to be relaxed in QuickCheck. I don't think we introduced any changes that would break QuickCheck.
I was in the audience. :) Syd gave this talk here in Minsk
|
We did, in a sense: QuickCheck used to rely on Or is what you're saying that if a project's library/application code uses
Nice :) |
I'm going to use this ticket to report my findings trying to port QuickCheck to
random v1.2
.QuickCheck goes to some lengths to be Hugs-compatible. Currently it uses SplitMix'
SMGen
on GHC andStdGen
fromrandom v1.1
on Hugs. That's an issue: I assume this is done because SplitMix does not build on Hugs. As a consequence,random v1.2
won't build on Hugs either, so itsStdGen
cannot be used as a fallback on non-GHC compilers by QuickCheck.A: SplitMix does not build on Hugs.
primitive
andbytestring
are GHC-only.MutGen
is based onMutableByteArray
fromprimitive
, and thegenByteArray
default implementation is also based on stuff imported fromprimitive
. If we want to, I believe that we can getrandom v1.2
to compile withoutprimitive
andbytestring
by puttingMutGen
and thegenByteArray
default implementation behind a flag.A: Yes, we can build
random v1.2
withoutbytestring
andprimitive
with CPP.splitmix
depends ondeepseq
, which is GHC-only. We could probably copy the actual PRNG code intorandom v1.2
and make it work withoutdeepseq
.The text was updated successfully, but these errors were encountered: