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

Free.foldMap throws a java.lang.ClassCastException #712

Closed
franciscodr opened this issue Dec 3, 2015 · 2 comments
Closed

Free.foldMap throws a java.lang.ClassCastException #712

franciscodr opened this issue Dec 3, 2015 · 2 comments
Assignees

Comments

@franciscodr
Copy link

As commented in a Gitter conversation, when I try to transform a free monad to another monad like Option, List or Future using foldMap, I get a java.lang.ClassCastException.

I'm using cats 0.4.0-SNAPSHOT

@ceedubs
Copy link
Contributor

ceedubs commented Dec 4, 2015

Thanks for reporting, @franciscodr! I'll start to take a look at this.

@ceedubs ceedubs self-assigned this Dec 4, 2015
ceedubs added a commit to ceedubs/cats that referenced this issue Dec 4, 2015
This reverts most of the changes from typelevel#702, because it appears to have
caused a regression in the case of Gosub. This commit fixes the
"mapSuspension id" unit test and the issue reported in typelevel#712.

The stack safety test is now failing. I've commented it out for now,
because an incorrectness bug seems to be worse than a stack safety
issue.
@franciscodr
Copy link
Author

@ceedubs After merging https://github.com/non/cats/pull/713, the example code works fine again. Thanks!

@ceedubs ceedubs closed this as completed Dec 9, 2015
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