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

Make liftF a method of MonadFree #208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

treeowl
Copy link

@treeowl treeowl commented Jul 11, 2021

This seems to work a bit better for things like FT.

@treeowl
Copy link
Author

treeowl commented Jul 11, 2021

This isn't strictly backwards compatible because MonadFree f m now requires that either:

  1. f is a Functor, or
  2. f does not need to be a Functor to implement liftF.

These hold for all the implementations in the package. I don't know if they fail somewhere else.

This seems to work a bit better for things like `FT`.
@treeowl
Copy link
Author

treeowl commented Jul 11, 2021

Hmm... That's a bit weird... the instance for Control.Monad.Free.Free actually didn't previously need a Functor f constraint, but it had one anyway.

@treeowl
Copy link
Author

treeowl commented Jul 16, 2021

Another option is to use a different name for the method, to preserve performance characteristics.

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

Successfully merging this pull request may close these issues.

1 participant