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

Optimize known coproducts #19

Merged
merged 2 commits into from
Oct 28, 2018
Merged

Optimize known coproducts #19

merged 2 commits into from
Oct 28, 2018

Conversation

franciscodr
Copy link
Contributor

This PR adds:

  • an AST optimization in FreesF to convert Cop[A :: Null :: TNil] -> Option[A]
  • an AST optimization in FreesF to convert Cop[A :: B :: TNil] -> Either[A, B]
  • unit tests for those optimizations

It closes #12

Copy link
Member

@pepegar pepegar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@franciscodr franciscodr merged commit 7076a57 into master Oct 28, 2018
@franciscodr franciscodr deleted the optimize-known-coproducts branch October 28, 2018 18:02
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.

Optimizations: Optimize known coproducts to named types such as Option or Either
3 participants