Skip to content

Commit

Permalink
Rename to Choreo
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Jan 29, 2024
1 parent 36c418c commit 970ebe3
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ScalaChord
## Choreo

A library for choregraphic programming in Scala.

Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
ThisBuild / organization := "me.romac"
ThisBuild / homepage := Some(url("https://github.com/romac/chord"))
ThisBuild / homepage := Some(url("https://github.com/romac/choreo"))
ThisBuild / licenses := Seq(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
)

ThisBuild / version := Versions.chord
ThisBuild / version := Versions.choreo
ThisBuild / scalaVersion := Versions.scala3
ThisBuild / scalacOptions ++= Seq("-source", "3.3")

lazy val root = project
.in(file("."))
.settings(
name := "chord",
name := "choreo",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % Versions.cats,
"org.typelevel" %% "cats-free" % Versions.cats,
Expand All @@ -23,7 +23,7 @@ lazy val root = project
lazy val examples = project
.in(file("examples"))
.settings(
name := "chord-examples",
name := "choreo-examples",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % Versions.cats,
"org.typelevel" %% "cats-effect" % Versions.catsEffect
Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/scala/Bookseller.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo
package examples
package bookseller

Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/scala/KV.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo
package examples
package kv

Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/scala/Main.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo
package examples

import cats.effect.IO
Expand Down
2 changes: 1 addition & 1 deletion project/Versions.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object Versions {
val chord = "0.1.0-SNAPSHOT"
val choreo = "0.1.0-SNAPSHOT"
val scala3 = "3.3.1"
val cats = "2.9.0"
val catsEffect = "3.5.3"
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/Backend.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo

import cats.Monad
import cats.free.Free
Expand All @@ -7,7 +7,7 @@ import cats.effect.std.Queue
import cats.effect.kernel.Concurrent
import cats.syntax.all.*

import chord.utils.toFunctionK
import choreo.utils.toFunctionK

trait Backend[B, M[_]]:
extension (backend: B)
Expand All @@ -28,7 +28,7 @@ class LocalBackend[M[_]](inboxes: Map[Loc, Queue[M, Any]]):
)(using M: Monad[M]): M[A] =
network.foldMap(run(at, inboxes).toFunctionK)

private[chord] def run(
private[choreo] def run(
at: Loc,
inboxes: Map[Loc, Queue[M, Any]]
)(using M: Monad[M]): [A] => NetworkSig[M, A] => M[A] = [A] =>
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/Choreo.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo

import cats.Monad
import cats.free.Free
Expand All @@ -7,7 +7,7 @@ import cats.effect.kernel.Concurrent
import cats.syntax.all.*
import cats.arrow.FunctionK

import chord.utils.toFunctionK
import choreo.utils.toFunctionK

type Choreo[M[_], A] = Free[[X] =>> ChoreoSig[M, X], A]

Expand Down Expand Up @@ -47,7 +47,7 @@ extension [M[_], A](c: Choreo[M, A])
def runLocal(using M: Monad[M]): M[A] =
c.foldMap(localHandler.toFunctionK)

private[chord] def localHandler(using
private[choreo] def localHandler(using
M: Monad[M]
): [A] => ChoreoSig[M, A] => M[A] = [A] =>
(c: ChoreoSig[M, A]) =>
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/Location.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo

import scala.annotation.targetName

Expand All @@ -23,10 +23,10 @@ extension [A, L <: Loc](a: A @@ L)
@targetName("unwrap")
def !(using U: Unwrap[L]): A = U(a)

private[chord] def wrap[L <: Loc]: [A] => A => A @@ L =
private[choreo] def wrap[L <: Loc]: [A] => A => A @@ L =
[A] => (a: A) => At.Wrap(a)

private[chord] def unwrap[L <: Loc]: Unwrap[L] = [A] =>
private[choreo] def unwrap[L <: Loc]: Unwrap[L] = [A] =>
(a: A @@ L) =>
a match
case At.Wrap(a) => a
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/Network.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package chord
package choreo

import cats.Monad
import cats.free.Free
import cats.effect.IO
import cats.syntax.all.*
import cats.arrow.FunctionK

import chord.utils.toFunctionK
import choreo.utils.toFunctionK

enum NetworkSig[M[_], A]:
case Run(ma: M[A]) extends NetworkSig[M, A]
Expand Down Expand Up @@ -39,7 +39,7 @@ object Endpoint:
def project[M[_], A](c: Choreo[M, A], at: Loc): Network[M, A] =
c.foldMap(epp[M](at).toFunctionK)

private[chord] def epp[M[_]](
private[choreo] def epp[M[_]](
at: Loc
): [A] => ChoreoSig[M, A] => Network[M, A] = [A] =>
(c: ChoreoSig[M, A]) =>
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/Utils.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package chord
package choreo
package utils

import cats.arrow.FunctionK
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/LocalSuite.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chord.*
import chord.typeclasses.*
import choreo.*
import choreo.typeclasses.*

class LocalSuite extends munit.FunSuite {
test("local bookseller") { () }
Expand Down

0 comments on commit 970ebe3

Please sign in to comment.