-
Notifications
You must be signed in to change notification settings - Fork 11
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
Generalize copy, perhaps #43
Comments
I was talking with Cale Gibbard, who said it seemed to go with an effects :: (Monad m, Comonad f) => Stream f m r -> m r |
If you only need |
@ocharles, that's a good idea for avoiding the dependency. It's kind of an ugly parameter, and would require a separate function (rather than replacing |
Well, I suggest it more from wondering if as you only want |
@ocharles, yes, that's a good point too, and the answer is ... yes! We can get copygen :: (Monad m, Functor f)
=> (forall a b. (f a -> b) -> f a -> g b)
-> Stream f m r -> Stream f (Stream g m) r |
Actually, we can even get copygen :: (Monad m, Functor g)
=> (forall a b. (f a -> b) -> g a -> h b)
-> Stream g m r -> Stream f (Stream h m) r |
This is no longer the official repo for |
I don't actually know if this "makes sense", but it works for
Of
and(,)
, and it kind of smells right.Comonad
is actually overkill; we only really needExtend
fromData.Functor.Extend
insemigroupoids
. Unfortunately, that's not a superclass.The text was updated successfully, but these errors were encountered: