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

Having a method doesn't mean having an algebra (problem with deriveAll) #5

Closed
rpominov opened this issue Mar 28, 2016 · 2 comments
Closed

Comments

@rpominov
Copy link
Member

deriveAll does algebra detection based on what methods the type has. But, for example, if a type has of and chain it doesn't mean it has Monad algebra. To support an algebra a type must have certain methods, but this rule doesn't work in the reverse direction.

We probably should add an algebras argument to deriveAll. Automatic detection based on methods is a good default though.

@rpominov
Copy link
Member Author

rpominov commented Apr 3, 2016

Maybe it's a good idea to require that type objects must have a property .algebras which is an array of supported algebra names.

We already have to pass around type objects, so it seems like a good idea to stash all useful meta information in them, so we at least have to pass only them.

@rpominov
Copy link
Member Author

Closing because deriveAll is removed in 0b6555c . May revisit later.

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

No branches or pull requests

1 participant