Skip to content

Make liftF a method of MonadFree#208

Open
treeowl wants to merge 1 commit into
ekmett:masterfrom
treeowl:freeliftf
Open

Make liftF a method of MonadFree#208
treeowl wants to merge 1 commit into
ekmett:masterfrom
treeowl:freeliftf

Conversation

@treeowl

@treeowl treeowl commented Jul 11, 2021

Copy link
Copy Markdown

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

@treeowl

treeowl commented Jul 11, 2021

Copy link
Copy Markdown
Author

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

treeowl commented Jul 11, 2021

Copy link
Copy Markdown
Author

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

treeowl commented Jul 16, 2021

Copy link
Copy Markdown
Author

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