-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to use / Proxy #68
Comments
I suggest you look at some code that uses
I think you can pick about any types for
Note that there are similar packages with more "modern" APIs, e.g. https://hackage.haskell.org/package/quickcheck-classes-0.6.5.0/docs/Test-QuickCheck-Classes.html. In case you're interested in improving the documentation or changing the API to use |
OK, thank you for the pointers, I'll get started. I might send an example. I have some new questions: Do you keep this API because of backwards compatibility? Don't you want to also provide a modern API? Is this package still valuable despite its less modern API because of featuring perhaps more laws? But you say I could update the API to use I would have to know better about this library to do changes like that: for example how would
|
Hasn't |
@conal Yes, mostly except for when using type families but needing the argument type still. However, for a beginner, seeing I wouldn't pass a proxy to disambiguate a type, but when the library is about testing types it makes sense that the type is somehow "an argument" of the function |
My 2¢: Type application is (GHC-)Haskell's modern, direct way of saying that the type (including higher-kinded) is an argument. The two older techniques you mention predated our ability to say so directly and so instead tried to fudge type applications with (ignored or vacuous) value applications. |
@conal You're right. I still think it would depend on who we would be showing the library to ( |
You might be the first person to point out that the current API is bit weird with it's requirement for an arbitrary value to guide type inference. I'm not aware of any previous discussions about modernizing the API. Backwards compatibility is a concern of course, but if we agree that a different API would be better, why stick with the old cruft?! Regarding differences to other libraries: The main reason I went with I agree with @conal though, that it would be better to use |
Hello,
I was trying to use but as someone unfamiliar with quick check it’s quite hard to understand how to use this library, so much that I’ve decided to open this issue.
I would love to see some examples of
functor
andmonad
From the source I understand the first argument of those functions is just to correctly infer the type of monad to test
m
, but I don’t understand the triple(a, b, c)
and their constraints (QuickCheck related). How am I supposed to call those functions?A thought: if the argument is discarded and is only there for matters of inference, why not use
Data.Proxy
which is what I think to be the preferred way of passing an argument for its type?The text was updated successfully, but these errors were encountered: