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

Implement fmap/coerce rules for GHC #63

Closed
treeowl opened this issue Nov 12, 2014 · 4 comments
Closed

Implement fmap/coerce rules for GHC #63

treeowl opened this issue Nov 12, 2014 · 4 comments

Comments

@treeowl
Copy link
Contributor

treeowl commented Nov 12, 2014

GHC.Base decrees

{-# RULES "map/coerce" map coerce = coerce #-}

This rule applies equally well to any legitimate Functor instance (any Functor instance that obeys the functor laws), including various ones in containers.

@foxik
Copy link
Contributor

foxik commented Nov 12, 2014

Patches welcomed :-)

@treeowl
Copy link
Contributor Author

treeowl commented Nov 13, 2014

I'll try. I got a bit bogged down implementing this for Array today. I also keep forgetting how to get upstream repos properly set up and synced with git, but I'll get that worked out for containers shortly, so I can do this properly.

@foxik
Copy link
Contributor

foxik commented Nov 21, 2014

Note for myself -- #71 (comment) still needs to get sorted out.

@treeowl
Copy link
Contributor Author

treeowl commented Nov 21, 2014

All are done except for SCC in Graph, and that's not too important because it should already be able to take advantage of the rules for lists.

@treeowl treeowl closed this as completed Nov 21, 2014
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

2 participants