Skip to content

Commit

Permalink
Run mdx on the .mli.
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrm committed Nov 21, 2024
1 parent 1204b35 commit a0e5100
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,13 @@ let () =
(< %{ocaml_version} 5.2.0))
(action
(copy atomic.without_contended.ml atomic.ml)))

(mdx
(package saturn)
(enabled_if
(and
(<> %{os_type} Win32)
(>= %{ocaml_version} 5.0.0)))
(libraries saturn)
(files treiber_stack.mli))
|}
8 changes: 4 additions & 4 deletions src/treiber_stack.mli
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ val pop_all : 'a t -> 'a list
order.
{[
# open Saturn_lockfree.Stack
# open Saturn.Stack
# let t : int t = create ()
val t : int t = <abstr>
# push t 1
Expand Down Expand Up @@ -105,7 +105,7 @@ val add_seq : 'a t -> 'a Seq.t -> unit
(** {1 Examples}
An example top-level session:
{[
# open Saturn_lockfree.Stack
# open Saturn.Stack
# let t : int t = create ()
val t : int t = <abstr>
# push t 42
Expand All @@ -119,11 +119,11 @@ val add_seq : 'a t -> 'a Seq.t -> unit
# pop_all t
- : int list = [2; 1; 42]
# pop_exn t
Exception: Saturn_lockfree__Treiber_stack.Empty.]}
Exception: Saturn__Treiber_stack.Empty.]}
A multicore example:
{@ocaml non-deterministic[
# open Saturn_lockfree.Stack
# open Saturn.Stack
# let t : int t = create ()
val t : int t = <abstr>
# let barrier = Atomic.make 2
Expand Down

0 comments on commit a0e5100

Please sign in to comment.