Skip to content

Commit

Permalink
API cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
durban committed Jul 4, 2023
1 parent 9cd5444 commit d4d6765
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
- either `Windows-PRNG`, or (`/dev/random` and `/dev/urandom`) must be available
- Scala 2.13 and 3.3
- \*.internal.\* packages (no bincompat)
- `unafe` APIs (no bincompat)
- MCAS API review
- is it usable outside of `choam`?
- it is, but the API is really not very good
- if not, it doesn't really make sense to have it in a separate module
- being in the same module would simplify using `ThreadContext` for `Rxn`-things
- Rename `flatMapF`
Expand Down
4 changes: 2 additions & 2 deletions core/shared/src/main/scala/dev/tauri/choam/refs/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ package object refs {
type Ref1[A] = Ref[A]
val Ref1: Ref.type = Ref

def unsafeNewRefU1[A](initial: A)(i0: Long, i1: Long, i2: Long, i3: Long): Ref[A] =
private[choam] def unsafeNewRefU1[A](initial: A)(i0: Long, i1: Long, i2: Long, i3: Long): Ref[A] =
RefsPlatform.unsafeNewRefU1[A](initial, i0, i1, i2, i3)

def unsafeNewRefP1[A](initial: A)(i0: Long, i1: Long, i2: Long, i3: Long): Ref[A] =
private[choam] def unsafeNewRefP1[A](initial: A)(i0: Long, i1: Long, i2: Long, i3: Long): Ref[A] =
RefsPlatform.unsafeNewRefP1[A](initial, i0, i1, i2, i3)

private[choam] def unsafeNewStrictRefArray[A](size: Int, initial: A)(i0: Long, i1: Long, i2: Long, i3: Int): Ref.Array[A] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ trait TestInstances extends TestInstancesLowPrio0 { self =>
)
}

implicit def cogIor[A, B](implicit cogA: Cogen[A], cogB: Cogen[B]): Cogen[Ior[A, B]] = {
implicit def cogenIor[A, B](implicit cogA: Cogen[A], cogB: Cogen[B]): Cogen[Ior[A, B]] = {
Cogen { (seed, ior) =>
ior.fold(
a => cogA.perturb(seed.next, a),
Expand Down

0 comments on commit d4d6765

Please sign in to comment.