-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix collectOf on Grate Module #63
Conversation
test/Main.purs
Outdated
collectOfTest :: forall f a b. Distributive f => (a -> f b) -> Tuple a a -> f (Tuple b b) | ||
collectOfTest = collectOf aGrateExample | ||
collectOfTest :: forall f g a b. Functor f => Distributive g => (a -> g b) -> f a -> g (f b) | ||
collectOfTest = collectOf cotraversed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does collectOf aGrateExample
still type check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paf31 hmm, no, it have different type, if we apply collectOf
to aGrateExample
, it will have this type instead:
collectOfTest :: forall f a b. Functor f => (a -> Tuple b b) -> f a -> Tuple (f b) (f b)
collectOfTest = collectOf aGrateExample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want me to add tests for it?
@paf31 I add test example for |
This close #62.