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

Create and use type alias for HK concrete clases and small fixes #56

Merged
merged 1 commit into from
Apr 4, 2017

Conversation

ffgiraldez
Copy link
Member

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

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
Copy link

codecov bot commented Apr 3, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@35c6d3e). Click here to learn what that means.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #56   +/-   ##
=========================================
  Coverage          ?   39.19%           
  Complexity        ?       59           
=========================================
  Files             ?       26           
  Lines             ?      347           
  Branches          ?       42           
=========================================
  Hits              ?      136           
  Misses            ?      195           
  Partials          ?       16
Impacted Files Coverage Δ Complexity Δ
katz/src/main/kotlin/katz/arrow/FunctionK.kt 0% <ø> (ø) 0 <0> (?)
...tz/src/main/kotlin/katz/typeclasses/Applicative.kt 18.42% <ø> (ø) 0 <0> (?)
katz/src/main/kotlin/katz/data/NonEmptyList.kt 38.46% <0%> (ø) 9 <0> (?)
...src/main/kotlin/katz/instances/CoproductComonad.kt 0% <0%> (ø) 0 <0> (?)
katz/src/main/kotlin/katz/instances/OptionMonad.kt 80% <0%> (ø) 4 <0> (?)
katz/src/main/kotlin/katz/instances/IdMonad.kt 80% <0%> (ø) 3 <0> (?)
katz/src/main/kotlin/katz/data/Reader.kt 84.61% <100%> (ø) 2 <1> (?)
katz/src/main/kotlin/katz/data/Id.kt 25% <100%> (ø) 1 <1> (?)
katz/src/main/kotlin/katz/data/OptionT.kt 25.92% <100%> (ø) 1 <1> (?)
katz/src/main/kotlin/katz/data/Either.kt 36.84% <100%> (ø) 5 <1> (?)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35c6d3e...5e532d0. Read the comment docs.

@@ -14,6 +14,8 @@
* limitations under the License.
*/

@file:Suppress("UNUSED_PARAMETER")
Copy link
Member

Choose a reason for hiding this comment

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

what is this for?

Copy link
Member Author

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

Copy link
Member

@pakoito pakoito left a comment

Choose a reason for hiding this comment

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

:shipit: LGTM

@@ -16,7 +16,7 @@

package katz

interface FunctionK<F, G> {
interface FunctionK<in F, out G> {
Copy link
Member

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?

Copy link
Member Author

@ffgiraldez ffgiraldez Apr 3, 2017

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 🤣 )

Copy link
Member

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?

Copy link
Member

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

@raulraja raulraja merged commit 14b72fb into master Apr 4, 2017
@raulraja raulraja deleted the higiene/use-typealias branch April 4, 2017 01:24
ambrusadrianz pushed a commit to ambrusadrianz/arrow that referenced this pull request Oct 22, 2019
* Internal files structure reorg to comply with GH

* Exclude `src` dir from Jekyll site

* Rename site launching command
rachelcarmena pushed a commit that referenced this pull request Feb 24, 2021
rachelcarmena added a commit that referenced this pull request Feb 24, 2021
rachelcarmena pushed a commit that referenced this pull request Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants