summaryrefslogtreecommitdiff
path: root/src/lib/sounds
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/sounds')
-rw-r--r--src/lib/sounds/sounds.ml29
-rw-r--r--src/lib/sounds/sounds.mli5
2 files changed, 22 insertions, 12 deletions
diff --git a/src/lib/sounds/sounds.ml b/src/lib/sounds/sounds.ml
index cc801dd..aad7cf0 100644
--- a/src/lib/sounds/sounds.ml
+++ b/src/lib/sounds/sounds.ml
@@ -116,14 +116,11 @@ let voyel_u =
let p =
{ none with
- code = Consonant_P
- ; mutable_ = false }
+ code = Consonant_P }
let b =
{ none with
- code = Consonant_B
- ; mutable_ = false
- }
+ code = Consonant_B }
let t =
{ none with
@@ -143,6 +140,11 @@ let g =
{ none with
code = Consonant_G }
+(** f is alway pronounend in ending consonant. Know exeception are :
+ - cerf
+ - clef
+ - nerf
+ - serf *)
let f =
{ none with
code = Consonant_F
@@ -227,18 +229,23 @@ let rec nasal t =
| Voyel, _ -> Some { t with nasal = true }
| _ -> None
-let muted f =
- (* f is alway pronounend in endding consonant. Know exeception are :
- - cerf
- - clef
- - nerf
- - serf *)
+let is_muted t =
+ match t.code with
+ | Muted _ -> true
+ | _ -> false
+
+let mute f =
match f.mutable_ with
| false -> f
| true ->
{ none with
code = Muted f }
+let unmute t =
+ match t.code with
+ | Muted t -> t
+ | _ -> t
+
let repr
: (module Sig.REPR) -> t list -> string
= fun m letters ->
diff --git a/src/lib/sounds/sounds.mli b/src/lib/sounds/sounds.mli
index 3b7b760..fb902cb 100644
--- a/src/lib/sounds/sounds.mli
+++ b/src/lib/sounds/sounds.mli
@@ -1,7 +1,6 @@
module Sig = Sig
type t
-val muted : t -> t
val a : t
val e : [`Closed | `Opened] -> t
@@ -75,5 +74,9 @@ val semi_voyel_u: t
val is_voyel : t -> bool
val is_nasal : t -> bool
+val is_muted : t -> bool
+val mute : t -> t
+val unmute: t -> t
+
val repr
: (module Sig.REPR) -> t list -> string