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

Update libraries sub-page for 0.9.1 #1421

Merged
merged 1 commit into from Apr 25, 2019
Merged

Update libraries sub-page for 0.9.1 #1421

merged 1 commit into from Apr 25, 2019

Conversation

pakoito
Copy link
Member

@pakoito pakoito commented Apr 25, 2019

No description provided.

@pakoito pakoito requested review from raulraja, nomisRev and a team April 25, 2019 11:05
@pakoito pakoito merged commit 463e9cf into master Apr 25, 2019
@pakoito pakoito deleted the paco-libsdoc091 branch April 25, 2019 11:49
@pakoito pakoito mentioned this pull request Apr 25, 2019
12 tasks
nomisRev pushed a commit to nomisRev/kategory that referenced this pull request Jul 22, 2019
pakoito pushed a commit that referenced this pull request Jul 25, 2019
* Remove Partial Functions.

The API of the PartialFunction class is very similar to
that of the `PartialFunction` class from the Scala standard libary:
an interface that extends from the normal `Function` by adding
an "isDefinedAt" method, which says if a function is defined for a
value of its domain.

Partial Functions are probably one of the worst errors of Scala.
They break with both Functional and Object-Oriented Programming.

The preferred approach to typed Functional Programming is based on the
idea of building programs in total functions, that are always total
(terminate without error) on all the inputs of a domain, which domain
is specified through the type. Partial Functions go against this.

Having Partial Functions to inherit from the Function interface
goes against the principles of Object-Oriented programming.
According to the Liskov Substitution Principle (LSP), in a well-formed
inheritance relation any instance of a sub-class can always be passed
and substitute for a reference to the super-class, in every context
in which the reference to the superclass is  expected to work correctly.
From this follows that the sub-class can never restrict the
preconditions or loose the postconditions of any of its methods
PartialFunctions go against this: they explicitly make the `apply`
method likely to be fail for a subset of the intended domain.

Partial Functions are also a redundant abstraction: the possibility of
a function not being defined from an input `A` can be represented
using an Option return type: (A) -> Option<B>.
For a faster alternative, one without allocating  `Some` objects,
one can also use Kotlin's nullable types.

One major reason why Scala choose to encode PartialFunction as an
instance of Function was to make it convenient to write function
literals as braces-cases.

* Update libraries sub-page for 0.9.1 (#1421)

* Add deprecation notice to PartialFunction (#1423)

* Add deprecation notice to PartialFunction

* Add deprecation notice to functions using PartialFunction

* Revert imports

* Bracket/GuaranteeCase stack safety (#1425)

* Add stack safety tests bracket/guaranteeCase

* Trampoline bracket/guaranteeCase

* Fix import

* Update modules/effects/arrow-effects-data/src/main/kotlin/arrow/effects/IO.kt

* Update modules/effects/arrow-effects-data/src/main/kotlin/arrow/effects/internal/IOBracket.kt

* Klint fix

* KotlinTest `forFew` bug (#1426)

* Remove several deprecated APIs (#1424)

* Remove several deprecated APIs

* Fix imported deprecated API

* Fix deprecation uses

* Fix TryTest

* Fix imports

* Revert imports

* Fix examples

* Fix MonadDeferLaws bytecode error

* Fix MonadDeferLaws bytecode error attempt 2

* making iterateRight an extension of Iterator (#1428) (#1434)

* Add new recommended constructor for Ref (#1436)

* Add new constructor for Ref

* Update docs

* detekt

* Refactor Ref constructors

* Refactor API for MVar

* Add ref to MonadDefer and MVar to Concurrent

* Fix Semaphore

* Code review

* Fix docs

* Fix compilation

* Fix docs

* Fix ktlint

* Fix tests

* Fix tests

* Fix dokka

* Fix dokka

* Add badge with stackoverflow link for support (#1440)

* Add badge with stackoverflow link for support

* Add stackoverflow badge for docs

* Add benchmarks for IO (#1441)

* IO rewrite ContinueOn impl (#1443)

* Fix typo and add code markings to `ApplicativeError` documentations (#1446)

* IO incomplete `IORunLoop#step` (#1442)

* Update Eval.kt docs (#1378)

* 0.9.0 dependencies in README.md

* Add imports to Eval examples

* Having a paragraph after the example, make dokka generate the snippet

* Remove old documentation for Eval

* Change links to new Eval documentation

* Modify Eval link in sidebar

* Restore README.md

* add playground label to ank

* Adding boilerplate needed to run playground code

* Adapt the rest of the examples for playground support

* Update modules/docs/arrow-docs/docs/docs/datatypes/intro/README.md

Co-Authored-By: Adrian Ramirez Fornell <15971742+AdrianRaFo@users.noreply.github.com>

* Update modules/docs/arrow-docs/docs/docs/quickstart/libraries/README.md

Co-Authored-By: Adrian Ramirez Fornell <15971742+AdrianRaFo@users.noreply.github.com>

* Update modules/docs/arrow-docs/docs/docs/arrow/typeclasses/monad/README.md

Co-Authored-By: Adrian Ramirez Fornell <15971742+AdrianRaFo@users.noreply.github.com>

* Update modules/docs/arrow-docs/docs/docs/arrow/typeclasses/monad/README.md

Co-Authored-By: Adrian Ramirez Fornell <15971742+AdrianRaFo@users.noreply.github.com>

* Update modules/docs/arrow-docs/docs/docs/arrow/typeclasses/foldable/README.md

Co-Authored-By: Adrian Ramirez Fornell <15971742+AdrianRaFo@users.noreply.github.com>

* Update sampleStart sampleEnd lines

* Needed space to pass ktlint checks

* Remove unneeded diagram macro

* IO trampoline async (#1448)

* IO forking (#1447)

* Redeem/RedeemWith (#1450)

* Concurrent - sleep & waitFor (#1449)

* IO effect in runloop (#1451)

* Add .tupled()/.untupled() to function syntax (#1453)

* Add .tupled()/.untupled() to function syntax

Changes:

* Adds .tupled() to function syntax, which converts a n-arity
  function to a function taking a single n-tuple argument.
* Adds .untupled() which does the reverse (converts a function
  taking a single n-tuple argument into a n-arity function.

Motivation:

Without this change, applicative instance methods must take
a lambda, even if the method signature appears to match, since
the instance methods pass all arguments as a single tuple:

```
fun concat(a: String, b: String) = a + b

// yields Some("foobar")
// lambda is only used to destructure the Tuple2
Option.applicative().map("foo".some(), "bar".some(), { (a, b)
-> concat(a, b) })
```

With this change, a modified function reference can be used instead:

```
fun concat(a: String, b: String) = a + b

// yields Some("foobar")
Option.applicative().map("foo".some(), "bar".some(), ::concat.tupled())
```

* Revert import mangling by IJ

* Remove wildcard import to fix linter

* Remove blank line to satisfy linter

* add triple tuple3 interoperability (#1457)

* Improve racing APIs (#1459)

* Remove Dagger Integration (#1460)

This integration has not had much traction and we have discovered encodings in which there is no need to use external DI tools in order to do proper DI with Kotlin. The delegation system, receiver functions and subtype constrains on type arguments are enough to provide manual DI with minimal boilerplate

* Deprecate Legacy Validation utils (#1462)

The Validation utils have been assimilated in the `Apply.map` features which abstract over arity for `Validated`, `Either` and in general all data types that provide an instance of `ApplicativeError`.
Additionally it's possible to abstract over validation strategies and error handling in general https://arrow-kt.io/docs/patterns/error_handling/#example--alternative-validation-strategies-using-applicativeerror
The current utilities abuse unsafe APIs and bails with exceptions being inconsistent with the `Left` short-circuit monad extension for `Either` and models error accumulation with a data type that may be empty.

* Remove Shadow module. (#1461)

This module was an attempt to use Arrow to build arrow-meta but we have not found a way to package it so that extension functions and exported functions are also available. Removed for the time being for 1.0

* Fix benchmarks and add CI step (#1463)

* Introduce Timer (#1464)

* Generalizes `firstOption` and promotes it to `Foldable`. (#1466)

* Generalizes `firstOption` and promotes it to `Foldable`.

- [x] Generalizes `firstOption` making it part of the `Foldable` algebra.
- [x] Removes the need to pass the `Either.momad()` constrain by implementing `get` in terms of `foldLeft` and using `Either`'s api directly.
- [x] Deprecates all usages of `firstOption` in `arrow-syntax`

* Added Foldable laws for `firstOption`

* Fix foldable docs

* Remove unused import

* Enable project parallelism for Gradle (#1456)

* Move the Documentation for `Id` from README.md to the Id.kt (#1474)

* move the documentation to the id class

* Fixing the comments of id class

* Change the url in the side menu to the new page created from the class comments

* Fix the playground and removes some no sense coments

* Removed empty line

* Adde dot ad the end of the sentence.

* Change the link in the readme files

* Add the blog post `How KEEP-87 & Typeclasses will change the way we write Kotlin` (#1476)

* Fx type class hierarchy and a la carte binding strategies (#1465)

* Move fx to typeclasses

* Add fx to companion for core-extensions

* Add Fx to companion for extras-extensions

* Move arrow-effects Fx to typeclasses
Breaking change: Remove global cancellation support

* Avoid bailing in the doc processor because a function is not found.
This is triggered once a `val` is used inside a `@documented` interface.

* Cache all extension instances that can be cached as a package val

* Cache extensions widening to Any? to avoid allocation in dependency-less extensions

* inline companion extensions

* Binding strategies and implementations over core data types. Towards removing stack labels

* refactored up to monad defer laws

* merged but not yet in a compiling state

* merged but not yet in a compiling state

* Remove outdated monad defer laws after removing most bind overloads

* Fix for meta widening parameters incorrectly in the singleton instances constrained by sub types like `A: Number`

* Add suspended bind for `IO`

* compiles!

* Fix build

* Add missing import

* update IO test API

* update Free test API

* Simplify Fx type names

* Remove unusued code

* Fix imports

* Different encoding for Function1

* delegate all fx functions

* cache fx instances for all the core monad extensions

* Remove Free's bindingStackSafe

* Fix imports

* Add missing COROUTINE_SUSPENDED

* Split tests in FreeTest

* Hide continuations from receiver

* Remove suspend modifier from strategy

* ktlintFormat

* Remove all suspend keywords from inheritors

* Add missing COROUTINE_SUSPENDED

* Rename to Syntax

* Remove BindingStrategy

* Remove nested hierarchies from typeclasses

* Reduce visibility arrow-meta internal

* Revert IOTest from suspend strategy

* fix docs

* Remove import based fx from docs

* Revert "Remove import based fx from docs"

This reverts commit cbbedfe.

* Revert "fix docs"

This reverts commit c44bf66.

* Revert "Revert IOTest from suspend strategy"

This reverts commit 9d5b0fc.

* Revert "Reduce visibility arrow-meta internal"

This reverts commit c4c9164.

* Revert "Remove nested hierarchies from typeclasses"

This reverts commit 470a016.

* Fixing docs

* Put back Ank main..

* Update MonadFilter docs

* MonadFilterLaws ktlintFormat

* fix build

* ktlintFormat

* fix racePair/racetriple docs

* Remove BindingStrategy // fix Concurrent docs

* Increase sleep in IOTest & fix docs

* Fix Resource docs

* Fix glossary

* Fix Fiber docs

* More doc fixes

* Use MonadThrow fx for Try

* Fix MonadFilter BindSyntax & improve IOTest

* fix docs

* fixes ["Request"] convenient Option.mapNotNull #1475 (#1479)

* fixes ["Request"] convenient Option.mapNotNull #1475

* fixes ["Request"] Ktlint errors

* fixes Ktlint errors and removed unintended reformatting

* Favor Either and IO instead of Try (#1478)

* Add catch constructor to Either

* Add other catch constructor to Either

* Add deprecation notices in favor of Either

* Fix ReplaceWith

* Make Either constructors suspend

* Improve Try deprecation notice

* Deprecate Monad.*effect* methods without suspensions (#1472)

* Add .tupled()/.untupled() to function syntax

Changes:

* Adds .tupled() to function syntax, which converts a n-arity
  function to a function taking a single n-tuple argument.
* Adds .untupled() which does the reverse (converts a function
  taking a single n-tuple argument into a n-arity function.

Motivation:

Without this change, applicative instance methods must take
a lambda, even if the method signature appears to match, since
the instance methods pass all arguments as a single tuple:

```
fun concat(a: String, b: String) = a + b

// yields Some("foobar")
// lambda is only used to destructure the Tuple2
Option.applicative().map("foo".some(), "bar".some(), { (a, b)
-> concat(a, b) })
```

With this change, a modified function reference can be used instead:

```
fun concat(a: String, b: String) = a + b

// yields Some("foobar")
Option.applicative().map("foo".some(), "bar".some(), ::concat.tupled())
```

* Revert import mangling by IJ

* Remove wildcard import to fix linter

* Remove blank line to satisfy linter

* Deprecate Monad.*effect* methods without suspensions

Changes:

* Deprecated Monad.effectM, Monad.forEffect, and Monad.forEffectEval in
favor of Monad.flatTap, Monad.productL, and Monad.productLEval,
respectively.  Rationale:
** Methods named with `effect` have semantic meaning in suspension
functions in Arrow;
** The names match the corresponding method names in cats.

* Deprecate Monad.*effect* methods without suspensions

Changes:

* Deprecated Monad.effectM, Monad.forEffect, and Monad.forEffectEval in
favor of Monad.flatTap, Monad.productL, and Monad.productLEval,
respectively.  Rationale:
** Methods named with `effect` have semantic meaning in suspension
functions in Arrow;
** The names match the corresponding method names in cats.

* Fixed `ReplaceWith` syntax

* Ank not fail fast (#1480)

* Collect errors

* Concurrent instances for Rx (#1427)

* Add support for suspend functions via the effect constructor in Async. Rename delay to later. (#1439)

* Add `effect` function

* Add laws to check for `effect` equivalence

* Fix Syntax

* Fix AsyncLaws

* Add `effect` docs to Async and IO

* Add docs for suspend support in Rx

* Add effect constructor to IO

* Default to instance method

* Fix ktlint

* Fix ank

* Fix PR

Co-Authored-By: Simon Vergauwen <nomisRev@users.noreply.github.com>

* Fix PR

Co-Authored-By: Simon Vergauwen <nomisRev@users.noreply.github.com>

* Rename MonadDefer#delay to later

* Rename remaining references to old defer or delay

* Replace delay with later in docs

* Default constructor to support suspend functions

* Fix remaining references to delay

* Fix build

* remove delay from codebase

* Fix docs

* Fix more docs

* moved arrow-typeclasses to arrow-core-data with their respective tests (#1481)

* moved arrow-typeclasses to arrow-core-data with their respective tests

* removed arrow-typeclasses

* moved Andthen to arrow-core-data

* moved Ior to arrow-core-date

* clean up for Ior Test and for Kotlin Test

* moved Validated to arrow-core-data

* moved andthen extension, ListK and his extension to arrow-core-data

* moved the validated & ior extension

* fixed imports from arrow.data to arrow.core

* clean-up : there is still problems with @extension and @higherkind

* resolved warnings

* cleaned up imports

* moved Map and MapK to arrow.core.data

* moved Setk to arrow-core-data

* get rid of non existing class issue because of bad imports

* fixed imports

* fixed FIXME's

* cleaned up unused arrow.data imports

* deleted duplicated functions in MapK and TupleN -> MapK survived

* Deprecate concurrent async (#1486)

* Deprecate Concurrent#async

* Single cancelable/cancelableF

* Fix build

* Fix build

* Add Observable.cancelable

* Add Flowable cancelable

* ktlintformat

* Fix wrong import in docs

* Code review

* Adding Bitraverse Typeclass (#1487)

* move the documentation to the id class

* Fixing the comments of id class

* Change the url in the side menu to the new page created from the class comments

* Fix the playground and removes some no sense coments

* Removed empty line

* Adde dot ad the end of the sentence.

* Change the link in the readme files

* Implemented Bitraverse interface

* Define identitiy law

* Add first comments bitraverse

* Implemente bitraverse for either

* start the implementation fo tuple

* Fix Bitraverse implementation

* Fix either instance

* Fix tuple instance

* Fix Bitraverse law

* Implement Bitraverse Either test

* Added test to tuple

* Removed unused type

* Added documentation inside the code

* Added the link in the sidebar

* Add a short description inside the intro document

* Change the code examples

* Fix the wildcard in the imports

* Remove Either unncecesary method

* Removed Tuple unnecessary method.

* Added instance of bifoldable and bitraverse in Ior

* Added instance of bifoldable and bitraverse in Validated

* Add the Bifoldable laws to Bitraverse

* Removed bifoldable laws which is included in bitraverse

* Add Ank playground to the documentation

* Rely the Either Bifoldable instance to the Either Data type implementation

* Rely the Ior Bifoldable instance to the Ior Data type implementation

* Bump to Kotlin 1.3.31 (#1482)

* Bumpt to Kotlin 1.3.31

See https://youtrack.jetbrains.com/issue/KT-31664

* Try noStdlibLink = true to pass the build

* Revert "Bump to Kotlin 1.3.31 (#1482)" (#1491)

This reverts commit df89910.

* untangeling datatypes (#1488)

* moved SequenceK to arrow-core-data

* moved SortedMap & SortedMapK to arrow-core-data

* splitted arrow-mtl into arrow-mtl-data and arrow-mtl-extensions

* created mtl modules and ui module

* moved EitherT, OptionT

* added Kleisli

* moved StateT, state

* moved Cokleisli & Coreader

* moved WriterT

* move Day to arrow-ui

* moved tests and ui datatypes

* Ain't no Coproducts... anymore

* cleanup ReadMe and merged last commit in master

* removed comment

* refactor task for effects (#1495)

* init

* marked failed imports

* collapsed io-extensions and -extensions into arrow-effects-data

* small fix in ReadME

* collapsed reactor

* collapsed rx2

* seperated mtl instances from effects-data

* ;) arrow.fx.IO done

* build file clean up and renamed arrow-benchmarks-fx

* adapted free module to current package structure for 0.10.0 (#1496)

* Replace IO suspend with defer (#1497)

* Optics modules (#1492)

* Move mtl Setter ops

* Move Traversal State to mtl and add docs

* Move Lens Reader/State extensions to optis-mtl

* Getter mtl

* Prism mtl

* Split arrow-optics into arrow-optics-core

* Optional kdocs

* Fix docs

* Merge arrow-optics and arrow-optics-core

* Fix docs

* New blog post for the "Modular functional programming with Kotlin" post (#1503)

* Add linting documentation documentation (#1500)

* Add Linting documentation. Add a new section explaining redundant suspend modifier and redundant unit return type IDEA warnings and how they can be disabled

* Add Linting section in the sidebar within quick start block

* Add linting section to project README, containing a brief explanation and redirects to the new section to keep it short

* Cache singleThreadContext (#1506)

* moved FunctorFilter to core (#1509)

* moved FunctorFilter to core

* moved functorfilter instances

* added mtl extensions for the docs

* Create 2019-07-05-testing-with-modules.md (#1507)

* tries to deploy new artifacts (#1512)

* move TraverseFilter, MonadCombine and MonadFilter (#1511)

* first try - kapt fail

* unfixed NonExistentClass error

* somehow stable tests

* fixed imports

* stable

* aql is born (#1515)

* Fix merge conflicts

* fix docs & merge left-overs

* Fix docs

* Fix Prism docs

* fix build
@raulraja raulraja mentioned this pull request Sep 10, 2019
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

3 participants