-
Notifications
You must be signed in to change notification settings - Fork 454
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
Add Yoneda and CoYoneda, along with their Functor instances #83
The head ref may contain hidden characters: "paco-co\u00F1oneta"
Conversation
typealias YonedaF<U> = HK<Yoneda.F, U> | ||
|
||
// FIXME using YonedaKind throws a compiler error, but not the expanded form | ||
interface Yoneda<FU, A> : HK<HK<Yoneda.F, FU>, A> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A compiler bug, someone call the JB cops :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug went away when I tried to compile again to get a debug trace. I've reported it anyway to https://youtrack.jetbrains.com/issue/KT-17619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug came back so I reverted it.
Codecov Report
@@ Coverage Diff @@
## master #83 +/- ##
===========================================
+ Coverage 47.05% 47.7% +0.65%
- Complexity 120 127 +7
===========================================
Files 58 62 +4
Lines 831 851 +20
Branches 131 131
===========================================
+ Hits 391 406 +15
- Misses 390 395 +5
Partials 50 50
Continue to review full report at Codecov.
|
Add two central pieces to the Free machinery: Yoneda and CoYoneda. They include a minimal implementation, along with a Functor instance. I've also written a minimal test suite for each.
For consistency purposes I've swapped the parameter order in the Free class.
Closes #80