-
Notifications
You must be signed in to change notification settings - Fork 451
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
Create and use type alias for HK concrete clases and small fixes #56
Conversation
Fix variance on FuntionK. Suppress unused parameter Aplicative.kt due to dummyparamenter hack Typealases created: - EitherKind - IdKind - IorKind - OptionKind Also return concrete classes instead of HK counterpart on Monads
Codecov Report
@@ Coverage Diff @@
## master #56 +/- ##
=========================================
Coverage ? 39.19%
Complexity ? 59
=========================================
Files ? 26
Lines ? 347
Branches ? 42
=========================================
Hits ? 136
Misses ? 195
Partials ? 16
Continue to review full report at Codecov.
|
@@ -14,6 +14,8 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
@file:Suppress("UNUSED_PARAMETER") |
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.
what is this for?
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.
Suppress the compile warning for using dummy implicits to hack the type erasure
w: ../katz/katz/src/main/kotlin/katz/typeclasses/Applicative.kt: (50, 9): Parameter 'dummyImplicit' is never used
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.
LGTM
@@ -16,7 +16,7 @@ | |||
|
|||
package katz | |||
|
|||
interface FunctionK<F, G> { | |||
interface FunctionK<in F, out G> { |
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.
why can't it be invariant?
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.
could be, but compiler warn me about they could have in/out variante in order to be more precise using their types so i add them.
Could let's keep it with in/out, at this point don't hurt and remove a lint warning.
We added deteck, but need could need also a lint (if not implode with our generics 🤣 )
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.
AFAIK covariant is generally more flexible than invariant, right? Why wouldn't we want it?
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.
Not saying we don't just curious as they FunctionK in Scala does not need type variance over it's args
* Internal files structure reorg to comply with GH * Exclude `src` dir from Jekyll site * Rename site launching command
Fix variance on FuntionK.
Suppress unused parameter Aplicative.kt due to dummyparamenter hack
Typealases created:
Also return concrete classes instead of HK counterpart on Monads