diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-03 17:44:44 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-03 17:44:44 +0200 |
commit | 66cb521749672586fd5b1182b14e3c5d44829616 (patch) | |
tree | 92adafc00225ce4775c3a98c59ac56582d4b0b5a /src/lib | |
parent | 025faa27075a15d9f3b2cb7f29c2228d3e4cb049 (diff) |
Extract representation in dedicated library
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dune | 2 | ||||
-rw-r--r-- | src/lib/reader.ml | 2 | ||||
-rw-r--r-- | src/lib/repr/default.ml (renamed from src/lib/sounds/repr.ml) | 0 | ||||
-rw-r--r-- | src/lib/repr/default.mli | 1 | ||||
-rw-r--r-- | src/lib/repr/dune | 4 | ||||
-rw-r--r-- | src/lib/sounds/repr.mli | 1 | ||||
-rw-r--r-- | src/lib/sounds/sounds.ml | 1 | ||||
-rw-r--r-- | src/lib/sounds/sounds.mli | 1 |
8 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/dune b/src/lib/dune index 89f3ddf..b290672 100644 --- a/src/lib/dune +++ b/src/lib/dune @@ -2,7 +2,7 @@ (name translator ) - (libraries menhirLib sounds modifiers) + (libraries menhirLib sounds modifiers repr) ) (menhir diff --git a/src/lib/reader.ml b/src/lib/reader.ml index 45ea69e..9a8e840 100644 --- a/src/lib/reader.ml +++ b/src/lib/reader.ml @@ -7,7 +7,7 @@ let sound_to_string = fun t -> let buff = Buffer.create 16 in List.iter t - ~f:(fun f -> Buffer.add_string buff (Sounds.repr (module Sounds.Repr) f)); + ~f:(fun f -> Buffer.add_string buff (Sounds.repr (module Repr.Default) f)); Buffer.contents buff let succeed (res : Sounds.t list) = diff --git a/src/lib/sounds/repr.ml b/src/lib/repr/default.ml index 72cf95d..72cf95d 100644 --- a/src/lib/sounds/repr.ml +++ b/src/lib/repr/default.ml diff --git a/src/lib/repr/default.mli b/src/lib/repr/default.mli new file mode 100644 index 0000000..27a84bb --- /dev/null +++ b/src/lib/repr/default.mli @@ -0,0 +1 @@ +include Sounds.Sig.REPR with type t = String.t diff --git a/src/lib/repr/dune b/src/lib/repr/dune new file mode 100644 index 0000000..c853440 --- /dev/null +++ b/src/lib/repr/dune @@ -0,0 +1,4 @@ +(library + (name repr) + (libraries sounds) + ) diff --git a/src/lib/sounds/repr.mli b/src/lib/sounds/repr.mli deleted file mode 100644 index 7e2e035..0000000 --- a/src/lib/sounds/repr.mli +++ /dev/null @@ -1 +0,0 @@ -include Sig.REPR with type t = String.t diff --git a/src/lib/sounds/sounds.ml b/src/lib/sounds/sounds.ml index e5f5d29..088485a 100644 --- a/src/lib/sounds/sounds.ml +++ b/src/lib/sounds/sounds.ml @@ -1,5 +1,4 @@ module Sig = Sig -module Repr = Repr type kind = | None diff --git a/src/lib/sounds/sounds.mli b/src/lib/sounds/sounds.mli index 8a07db3..8c11488 100644 --- a/src/lib/sounds/sounds.mli +++ b/src/lib/sounds/sounds.mli @@ -1,5 +1,4 @@ module Sig = Sig -module Repr = Repr type t val muted : t -> t |