Closed k0001 closed 11 years ago
Actually, all you have to do is change Effect'
to Effect
. You probably got the error because I just swapped the polymorphic and concrete type synonyms and haven't gotten a chance to fix the downstream libraries just yet.
I thought you would prefer the most polymorphic alternative, since Effect'
is quite polymorphic by itself. But then, I completely missed your rename, and thus the fact that you never meant it to be so polymorphic. I've added a new commit fixing this.
The trick is that any time you have a pipe as the argument of a function, you should use a concrete type (i.e. no apostrophe) and when it is the result it can use the polymorphic type (i.e. apostrophe). So in this case the most general type is:
promptly :: Effect m r -> Effect' m r
To see another example of this trick, check out the zip
function from Pipes.Prelude
, which has type:
zip :: (Monad m)
=> (() -> Producer a m r)
=> (() -> Producer b m r)
=> (() -> Producer' (a, b) m r)
Also, I think your pull request is not current with HEAD
because github won't let me merge this automatically. You can either issue a new pull request off the new HEAD
or pull in the latest changes from HEAD
so that I can merge this in, whichever you prefer.
Oops, that didn't occur to me. Thanks for mentioning it.
And about these commits not being able to be merged with master
, well, that was my mistake. I should have made the pull request against the 4.0.0
branch. I'll close this and open another one doing what you suggest.
OK, nevermind. Ignore all this discussion. It seems the 4.0.0
branch I was working on is old, and master
has the most recent development and builds just fine. So, nothing in this pull-request matters, sorry for wasting your time.
No apologies necessary! :)
GHC fails with the following error, otherwise: