Skip to content
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

Feature request: deriveFmap for functor compositions #43

Open
guoshimin opened this issue Oct 6, 2017 · 4 comments
Open

Feature request: deriveFmap for functor compositions #43

guoshimin opened this issue Oct 6, 2017 · 4 comments

Comments

@guoshimin
Copy link

Just a thought: seems it would be feasible to derive fmap for functors that are the composition of two or more functors, such as deriveFmap(func(A) B, func() ([A], error)) ([B], error)

@awalterschulze
Copy link
Owner

Interesting. I can see this example working.
Maybe you can provide a few more which include some joins, to see how we would handle stacked monads as well.
Just to make sure our theory is sound, before we start implementing.
What do you think?

@awalterschulze
Copy link
Owner

Hello?

@awalterschulze
Copy link
Owner

I think what we want here is traverse:

traverse :: Applicative f => (a -> f b) -> t a -> f (t b)

where f is (b, error) and t is a slice

@awalterschulze
Copy link
Owner

Oh no thats not what you were referring to, my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants