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

Bring kategory-annotations to the kategory repo #259

Merged
merged 1 commit into from
Sep 8, 2017

Conversation

raulraja
Copy link
Member

@raulraja raulraja commented Sep 8, 2017

Also fixes a bunch of instances issues and provides some implicit objects where instances can be looked up without the need to manually register anything.

@raulraja raulraja requested a review from a team September 8, 2017 01:35
@raulraja raulraja changed the title Bring kategory-annotations to the kategory repo WIP Bring kategory-annotations to the kategory repo Sep 8, 2017
@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #259   +/-   ##
=========================================
  Coverage          ?   41.74%           
  Complexity        ?      259           
=========================================
  Files             ?      136           
  Lines             ?     3145           
  Branches          ?      410           
=========================================
  Hits              ?     1313           
  Misses            ?     1706           
  Partials          ?      126
Impacted Files Coverage Δ Complexity Δ
.../main/kotlin/kategory/instances/CofreeInstances.kt 100% <ø> (ø) 0 <0> (?)
...ore/src/main/kotlin/kategory/typeclasses/Monoid.kt 0% <ø> (ø) 0 <0> (?)
...in/kotlin/kategory/instances/CoproductInstances.kt 100% <ø> (ø) 0 <0> (?)
...lin/kategory/instances/FreeApplicativeInstances.kt 85.71% <ø> (ø) 0 <0> (?)
...ry-core/src/main/kotlin/kategory/data/Coproduct.kt 68.18% <ø> (ø) 9 <0> (?)
...ory-core/src/main/kotlin/kategory/arrow/Kleisli.kt 53.84% <ø> (ø) 8 <0> (?)
...src/main/kotlin/kategory/typeclasses/MonadState.kt 0% <ø> (ø) 0 <0> (?)
...main/kotlin/kategory/instances/OptionTInstances.kt 94.44% <ø> (ø) 0 <0> (?)
...rc/main/kotlin/kategory/typeclasses/MonadReader.kt 0% <ø> (ø) 0 <0> (?)
...e/src/main/kotlin/kategory/typeclasses/Traverse.kt 0% <ø> (ø) 0 <0> (?)
... and 93 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 751f25a...640c9f9. Read the comment docs.

@@ -8,29 +8,7 @@ import io.kotlintest.specs.StringSpec
* Base class for unit tests
*/
abstract class UnitSpec : StringSpec() {
companion object {
Copy link
Member

Choose a reason for hiding this comment

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

Ho ho ho hoooo

@raulraja raulraja changed the title WIP Bring kategory-annotations to the kategory repo Bring kategory-annotations to the kategory repo Sep 8, 2017
@@ -78,7 +80,7 @@ formatting:
active: true
autoCorrect: true
OptionalUnit:
active: true
active: false
Copy link
Member

Choose a reason for hiding this comment

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

Ideally we'd need the opposite option: flagging places where Unit isn't there. For us explicitness is key and we've been bitten by returns that should be Unit instead before.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, If detekt rules can be user created we can also provide some to encourage a more functional style.

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.

Dancing in the greenlight, everybody's daaancing in the grreeeeennnnliiight

Copy link
Member

@aballano aballano left a comment

Choose a reason for hiding this comment

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

From my limited perception looks good to me :)

Copy link
Member

@tonilopezmr tonilopezmr left a comment

Choose a reason for hiding this comment

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

good job

@@ -59,17 +59,17 @@ data class ListKW<out A> constructor(val list: List<A>) : ListKWKind<A>, List<A>
return ListKW(buf)
}

fun functor(): ListKWHKMonadInstance = ListKW.monad()
fun functor(): ListKWMonadInstance = ListKW.monad()
Copy link
Member

Choose a reason for hiding this comment

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

Why haven't you deleted these methods like in Id or NonEmptyList?

Copy link
Member Author

Choose a reason for hiding this comment

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

I though I did, but will look over before merging

@raulraja raulraja merged commit 539de80 into master Sep 8, 2017
@raulraja raulraja deleted the rr-include-kategory-annotations branch September 8, 2017 17:33
@wiyarmir wiyarmir mentioned this pull request Sep 15, 2017
rachelcarmena added a commit that referenced this pull request Feb 24, 2021
* Makes DelimContScope#reset suspend

* Add suspending tests to TestSuite

* Move result to promise as well. Fixes suspension in shift before immediate return

* Update MultiShotCont with new impl

* Entry point api functions

* ktLintFormat

* Fix `suspended` in `FxLaws` doesn't actually suspend

* Re-add eager versions, fix `RestrictSuspension` in `nullable` and add suspend version

* Test that shows flow comprehension hanging

* Adds Stream test that also hangs

* Remove multi-shot test demos

* Effect interface and computation builder

* Rename Effect to computations

* Disable ktlint in effect file

* Correct suspension requires ControlThrowable

* Upgrade ktlint to allow fun interfaces

* Fix support for nested scopes, add tests for not leaking Arrow Fx & KotlinX Coroutines

* Removes NestedDelimContScope, makes Multishot private until we have a compiler plugin solution for ordered binds. Prepares DelimitedScope to be implemented by all and SuspendingComputation to replace DelimContScope if it's possible to implement its shift on it

* unfinished progress to share with Simon

* Add docs, revert some changes for RestrictSuspension implementation. Keep shiftCPS internally

* progress toward encoding effects with suspend an restricted delimited scopes

* tests passing

* remove runRestrictedSuspension

* Fix ktlintMainSourceSetCheck issues

* Fix ktlintTestSourceSetCheck issues

* Fix ktlint issues for arrow-core-data

* Adapted Fx laws, test failing with suspension

* ktlint

* fix for Fx laws

* Remove BindSyntax leftover for nullable

* Remove old destructuring syntax for bind from Either doc

* Raquel suggestion

Co-authored-by: Rachel M. Carmena <rachelcarmena@users.noreply.github.com>

* Deprecate `validated` block in favor of `either` block.

* Deprecate Validated fx

* Either.toValidated/Nel + fix to Validated docs

* ktlint fixes

Co-authored-by: Simon Vergauwen <vergauwen.simon@gmail.com>
Co-authored-by: Rachel M. Carmena <rachelcarmena@users.noreply.github.com>
Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
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.

None yet

6 participants