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

Add Cofree comonad #94

Merged
merged 30 commits into from
May 24, 2017
Merged

Add Cofree comonad #94

merged 30 commits into from
May 24, 2017

Conversation

pakoito
Copy link
Member

@pakoito pakoito commented May 13, 2017

Closes #92

@codecov
Copy link

codecov bot commented May 13, 2017

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #94   +/-   ##
=========================================
  Coverage          ?   50.44%           
  Complexity        ?      143           
=========================================
  Files             ?       65           
  Lines             ?      902           
  Branches          ?      129           
=========================================
  Hits              ?      455           
  Misses            ?      392           
  Partials          ?       55
Impacted Files Coverage Δ Complexity Δ
katz/src/main/kotlin/katz/instances/FreeMonad.kt 28.57% <ø> (ø) 0 <0> (?)
katz/src/main/kotlin/katz/typeclasses/Traverse.kt 0% <0%> (ø) 0 <0> (?)
...tz/src/main/kotlin/katz/typeclasses/Applicative.kt 16.94% <12.5%> (ø) 0 <0> (?)
katz/src/main/kotlin/katz/data/Eval.kt 41.26% <44.44%> (ø) 4 <4> (?)
katz/src/main/kotlin/katz/free/Cofree.kt 52.17% <52.17%> (ø) 9 <9> (?)
katz/src/main/kotlin/katz/free/Free.kt 61.76% <56.25%> (ø) 1 <0> (?)
...tz/src/main/kotlin/katz/instances/CofreeComonad.kt 60% <60%> (ø) 2 <2> (?)

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 0e5a0ab...351cb3e. Read the comment docs.

@pakoito
Copy link
Member Author

pakoito commented May 13, 2017

I'm only missing an example of running the monad with binding, if anyone could please provide it.

@pakoito
Copy link
Member Author

pakoito commented May 14, 2017

StackOverflow fixes required, probably related to Eval.Compute#value() (https://github.com/FineCinnamon/Katz/blob/master/katz/src/main/kotlin/katz/data/Eval.kt#L176)

Stack loop:

katz.Cofree#run
katz.Cofree$run$1$1#invoke
katz.Cofree$run$1$1#invoke
katz.OptionMonad$DefaultImpls#map
katz.Option$Companion#map
katz.Option$Companion#map
katz.Cofree$run$1#invoke
katz.Cofree$run$1#invoke
katz.Eval$map$1#invoke
katz.Eval$map$1#invoke
katz.Eval$Compute$value$1#invoke
katz.Eval$Compute#value
katz.Cofree#run

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

Aweosme work @pakoito . Can we add a stack safety test for Eval, I think that is critical to ensure other types built atop eval remain stacksafe

@pakoito
Copy link
Member Author

pakoito commented May 24, 2017

@raulraja I'm eager to merge this before CI breaks again! I'll add the tests in another PR today.

@pakoito pakoito merged commit d4fd0d1 into master May 24, 2017
@pakoito pakoito deleted the paco-ojalaquelluevacoffreeenelcampo branch May 24, 2017 18:56
ambrusadrianz pushed a commit to ambrusadrianz/arrow that referenced this pull request Oct 22, 2019
* format on java time instances

* add array codecs

* add array codec test

* fix map decoder

* Update helios-core/src/main/kotlin/helios/instances/instancesCollections.kt

Co-Authored-By: Simon Vergauwen <[email protected]>

* address comments

* some fixes after merge

* little improvements
rachelcarmena added a commit that referenced this pull request Feb 24, 2021
rachelcarmena pushed a commit that referenced this pull request Feb 24, 2021
* Remove Id typeclass references

* Remove Id tests
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.

2 participants