diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-14 13:46:38 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-14 13:46:38 +0200 |
commit | f68d06c6418e3d025e81e819183dfa049605bfa0 (patch) | |
tree | 6729a47ae68bf69e2d4c64907abb6e9bf976338f /src/lib/sounds | |
parent | 1d53f5efd02b228f22c2eba0bdfca6c2aabbd8f6 (diff) |
Corrections
Diffstat (limited to 'src/lib/sounds')
-rw-r--r-- | src/lib/sounds/sounds.ml | 29 | ||||
-rw-r--r-- | src/lib/sounds/sounds.mli | 5 |
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 |