Skip to content

Commit 52bc681

Browse files
authored
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
1 parent c0a00bc commit 52bc681

File tree

189 files changed

+551
-1346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+551
-1346
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ Arrow modules are exported and published with the following semantics.
6363

6464
If we take for example `arrow-core`.
6565

66-
Arrow core contains the basic arrow type classes and data types and it's composed of 3 main artifacts that may be used a la carte:
66+
Arrow core contains the basic arrow type classes and data types and it's composed of 2 main artifacts that may be used a la carte:
6767

6868
Recomended for most use cases:
6969

7070
- `arrow-core` (Depends on data and extensions modules and exports both)
7171

7272
Trimmed down versions:
7373

74-
- `arrow-core-data` (Only data types)
75-
- `arrow-core-extensions` (Only type class extensions)
74+
- `arrow-core-data` (Only data types & typeclasses)
75+
- `arrow-core` (Data types, typeclasses & type class extensions)
7676

7777
# Current stable version 0.9.0
7878

@@ -89,12 +89,8 @@ Add the dependencies into the project's `build.gradle`
8989
```groovy
9090
def arrow_version = "0.9.1-SNAPSHOT"
9191
dependencies {
92-
compile "io.arrow-kt:arrow-core-data:$arrow_version"
93-
compile "io.arrow-kt:arrow-core-extensions:$arrow_version"
92+
compile "io.arrow-kt:arrow-core:$arrow_version"
9493
compile "io.arrow-kt:arrow-syntax:$arrow_version"
95-
compile "io.arrow-kt:arrow-typeclasses:$arrow_version"
96-
compile "io.arrow-kt:arrow-extras-data:$arrow_version"
97-
compile "io.arrow-kt:arrow-extras-extensions:$arrow_version"
9894
kapt "io.arrow-kt:arrow-meta:$arrow_version"
9995
10096
compile "io.arrow-kt:arrow-query-language:$arrow_version" //optional

modules/ank/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ Example:
186186
````
187187
```kotlin:ank:replace
188188
import arrow.reflect.*
189-
import arrow.data.*
190189
import arrow.core.*
191190
192191
DataType(Option::class).tcMarkdownList()

modules/ank/arrow-ank/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apply plugin: 'kotlin'
22
apply plugin: 'kotlin-kapt'
33

44
dependencies {
5-
compile project(":arrow-core-extensions")
6-
compile project(":arrow-extras-extensions")
5+
compile project(":arrow-core")
76
compile project(":arrow-effects-io-extensions")
87

98
compile "org.jetbrains.kotlin:kotlin-compiler:$ankKotlinVersion"

modules/ank/arrow-ank/src/main/kotlin/arrow/ank/interpreter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import arrow.core.Tuple2
88
import arrow.core.Tuple3
99
import arrow.core.some
1010
import arrow.core.toT
11-
import arrow.data.extensions.sequence.foldable.foldLeft
11+
import arrow.core.extensions.sequence.foldable.foldLeft
1212
import java.io.PrintWriter
1313
import java.io.StringWriter
1414
import java.net.URL

modules/aql/arrow-query-language/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ dependencies {
44
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
55
compile project(':arrow-annotations')
66
compile project(':arrow-mtl')
7+
compile project(':arrow-core')
78
kapt project(':arrow-meta')
89
kaptTest project(':arrow-meta')
910
compileOnly project(':arrow-meta')
1011
testCompileOnly project(':arrow-meta')
1112
testRuntime("org.junit.vintage:junit-vintage-engine:$jUnitVintageVersion")
1213
testCompile "io.kotlintest:kotlintest-runner-junit4:$kotlinTestVersion"
13-
1414
testCompile project(':arrow-test')
1515
}
1616

modules/aql/arrow-query-language/src/main/kotlin/arrow/aql/extensions/sequence.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import arrow.aql.Select
88
import arrow.aql.Sum
99
import arrow.aql.Union
1010
import arrow.aql.Where
11-
import arrow.data.ForSequenceK
12-
import arrow.data.SequenceK
11+
import arrow.core.ForSequenceK
12+
import arrow.core.SequenceK
1313
import arrow.extension
14-
import arrow.data.extensions.sequencek.applicative.applicative
15-
import arrow.data.extensions.sequencek.foldable.foldable
16-
import arrow.data.extensions.sequencek.functor.functor
14+
import arrow.core.extensions.sequencek.applicative.applicative
15+
import arrow.core.extensions.sequencek.foldable.foldable
16+
import arrow.core.extensions.sequencek.functor.functor
1717
import arrow.mtl.extensions.sequencek.functorFilter.functorFilter
1818
import arrow.mtl.typeclasses.FunctorFilter
1919
import arrow.typeclasses.Applicative

modules/core/arrow-core-data/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
testCompile "io.kotlintest:kotlintest-runner-junit4:$kotlinTestVersion"
1212
testCompile project(':arrow-test')
1313
testCompile project(':arrow-syntax')
14-
testCompile project(':arrow-core-extensions')
14+
testCompile project(':arrow-core')
1515
}
1616

1717
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')

modules/core/arrow-core-data/src/main/kotlin/arrow/core/NonFatal.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ package arrow.core
1313
* ```kotlin:ank:playground
1414
* import arrow.*
1515
* import arrow.core.*
16-
* import arrow.data.*
1716
*
1817
* fun unsafeFunction(i: Int): String =
1918
* when (i) {
@@ -55,7 +54,6 @@ fun NonFatal(t: Throwable): Boolean =
5554
* ```kotlin:ank:playground
5655
* import arrow.*
5756
* import arrow.core.*
58-
* import arrow.data.*
5957
*
6058
* fun unsafeFunction(i: Int): String =
6159
* when (i) {

modules/core/arrow-extras-data/src/main/kotlin/arrow/data/SequenceK.kt renamed to modules/core/arrow-core-data/src/main/kotlin/arrow/core/SequenceK.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
package arrow.data
1+
package arrow.core
22

33
import arrow.Kind
4-
import arrow.core.Either
5-
import arrow.core.Eval
6-
import arrow.core.Tuple2
7-
import arrow.core.identity
84
import arrow.higherkind
95
import arrow.typeclasses.Applicative
106

modules/core/arrow-extras-data/src/main/kotlin/arrow/data/SortedMap.kt renamed to modules/core/arrow-core-data/src/main/kotlin/arrow/core/SortedMap.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
package arrow.data
1+
package arrow.core
22

33
typealias SortedMap<K, V> = java.util.SortedMap<K, V>

0 commit comments

Comments
 (0)