Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p core/.js/target core/.jvm/target project/target
run: mkdir -p core/.js/target core/.jvm/target fs2/.js/target fs2/.jvm/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar core/.js/target core/.jvm/target project/target
run: tar cf targets.tar core/.js/target core/.jvm/target fs2/.js/target fs2/.jvm/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
Expand Down
17 changes: 16 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import laika.helium.Helium
import laika.helium.config._
import laika.ast.Path.Root

// https://typelevel.org/sbt-typelevel/faq.html#what-is-a-base-version-anyway
ThisBuild / tlBaseVersion := "0.0" // your current series x.y

Expand Down Expand Up @@ -45,4 +49,15 @@ lazy val fs2 = crossProject(JVMPlatform, JSPlatform)
)
)

lazy val docs = project.in(file("site")).enablePlugins(TypelevelSitePlugin)
lazy val docs = project
.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.settings(
tlFatalWarnings := false,
laikaTheme := Helium.defaults.site
.topNavigationBar(
homeLink = IconLink.internal(Root / "index.md", HeliumIcon.home)
)
.build
)
.dependsOn(core.jvm, fs2.jvm)
19 changes: 18 additions & 1 deletion core/src/main/scala/com/codiff/fairstream/Fair.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
/*
* Copyright 2026 codiff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.codiff.fairstream

import cats.{Alternative, Monad}
import cats.Alternative
import cats.Monad

sealed trait Fair[+A]

Expand Down
21 changes: 20 additions & 1 deletion core/src/main/scala/com/codiff/fairstream/FairT.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
/*
* Copyright 2026 codiff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.codiff.fairstream

import cats.{Alternative, Applicative, Monad, ~>}
import cats.Alternative
import cats.Applicative
import cats.Monad
import cats.~>

sealed trait FairE[M[_], A]

Expand Down
16 changes: 16 additions & 0 deletions core/src/test/scala/com/codiff/fairstream/PythagoreanSuite.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2026 codiff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.codiff.fairstream

import cats.Eval
Expand Down
3 changes: 3 additions & 0 deletions docs/directory.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
laika.navigationOrder = [
index.md
]
20 changes: 19 additions & 1 deletion fs2/src/main/scala/com/codiff/fairstream/fs2/conversions.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
/*
* Copyright 2026 codiff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.codiff.fairstream
package fs2

import _root_.fs2.{Pull, Pure, Stream}
import _root_.fs2.Pull
import _root_.fs2.Pure
import _root_.fs2.Stream

object conversions {

Expand Down
19 changes: 18 additions & 1 deletion fs2/src/main/scala/com/codiff/fairstream/fs2/syntax.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
/*
* Copyright 2026 codiff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.codiff.fairstream
package fs2

import _root_.fs2.{Pure, Stream}
import _root_.fs2.Pure
import _root_.fs2.Stream

object syntax {

Expand Down
20 changes: 18 additions & 2 deletions fs2/src/test/scala/com/codiff/fairstream/fs2/FairFs2Suite.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
/*
* Copyright 2026 codiff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.codiff.fairstream
package fs2

import scala.concurrent.duration._

import cats.effect.IO
import cats.syntax.all._
import munit.CatsEffectSuite

import scala.concurrent.duration._

import syntax._

class FairFs2Suite extends CatsEffectSuite {
Expand Down
Loading