Skip to content

Commit

Permalink
fix!: remove Unmonad (#25)
Browse files Browse the repository at this point in the history
fix!: remove Unmonad
  • Loading branch information
favonia authored Oct 31, 2023
1 parent feba970 commit 80dca8d
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 31 deletions.
1 change: 0 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ We use [semantic versioning.](https://semver.org/) Breaking changes will bump th
- [Algaeff.Sequencer](https://redprl.org/algaeff/algaeff/Algaeff/Sequencer): making a `Seq.t`
- [Algaeff.Mutex](https://redprl.org/algaeff/algaeff/Algaeff/Mutex): simple locking to prevent re-entrance
- [Algaeff.UniqueID](https://redprl.org/algaeff/algaeff/Algaeff/UniqueID): generating unique IDs
- [Algaeff.Unmonad](https://redprl.org/algaeff/algaeff/Algaeff/Unmonad): effects for any monadic operations

Effects-based concurrency (cooperative lightweight threading) was already tackled by other libraries such as [Eio](https://github.com/ocaml-multicore/eio) and [Affect](https://erratique.ch/software/affect). This library focuses on the rest.

Expand Down
1 change: 0 additions & 1 deletion src/Algaeff.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ module Reader = Reader
module Sequencer = Sequencer
module Mutex = Mutex
module UniqueID = UniqueID
module Unmonad = Unmonad
module Sigs = Sigs
module Fun = Fun
2 changes: 0 additions & 2 deletions src/Algaeff.mli
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ module Mutex = Mutex

module UniqueID = UniqueID

module Unmonad = Unmonad

(** {1 Auxiliary modules} *)

module Sigs = Sigs
Expand Down
2 changes: 1 addition & 1 deletion test/TestReader.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end

module ReaderUnmonad =
struct
module U = Algaeff.Unmonad.Make (ReaderMonad)
module U = Unmonad.Make (ReaderMonad)
let read () = U.perform ReaderMonad.read
let scope f m = U.perform @@ ReaderMonad.scope f @@ U.run m
let run ~env f = U.run f env
Expand Down
2 changes: 1 addition & 1 deletion test/TestSequencer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ end

module SequencerUnmonad =
struct
module U = Algaeff.Unmonad.Make (SequencerMonad)
module U = Unmonad.Make (SequencerMonad)
let yield x = U.perform (SequencerMonad.yield x)
let run f = output_to_seq @@ snd @@ U.run f
let register_printer _ = ()
Expand Down
2 changes: 1 addition & 1 deletion test/TestState.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ end

module StateUnmonad =
struct
module U = Algaeff.Unmonad.Make (StateMonad)
module U = Unmonad.Make (StateMonad)
let get () = U.perform StateMonad.get
let set s = U.perform @@ StateMonad.set s
let modify f = U.perform @@ StateMonad.modify f
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 4 additions & 24 deletions test/dune
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
(test
(name TestState)
(modules TestState)
(libraries qcheck-core qcheck-core.runner algaeff))

(test
(name TestReader)
(modules TestReader)
(libraries qcheck-core qcheck-core.runner algaeff))

(test
(name TestSequencer)
(modules TestSequencer)
(libraries qcheck-core qcheck-core.runner algaeff))

(test
(name TestMutex)
(modules TestMutex)
(libraries alcotest algaeff))

(test
(name TestUniqueID)
(modules TestUniqueID)
(libraries qcheck-core qcheck-core.runner algaeff))
(tests
(names TestState TestReader TestSequencer TestMutex TestUniqueID)
(modules TestState TestReader TestSequencer TestMutex TestUniqueID Unmonad)
(libraries qcheck-core qcheck-core.runner alcotest algaeff))

(test
(name Example)
Expand Down

0 comments on commit 80dca8d

Please sign in to comment.