diff options
Diffstat (limited to 'src/lib/sounds.ml')
-rw-r--r-- | src/lib/sounds.ml | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/lib/sounds.ml b/src/lib/sounds.ml index ec1ddf2..0ee9f5c 100644 --- a/src/lib/sounds.ml +++ b/src/lib/sounds.ml @@ -22,6 +22,7 @@ module type T = sig val k: t val f: t val s: unit -> t + val sz: unit -> t val ch: unit -> t val z: unit -> t @@ -33,6 +34,12 @@ module type T = sig val is_voyel : t -> bool val is_nasal : t -> bool + type code = + | None + | SZ + + val code : t -> code + end module T = struct @@ -40,12 +47,18 @@ module T = struct | None | Voyel + type code = + | None + | SZ + type t = - { repr : string + { code : code + ; repr : string ; muted : bool ; kind : kind ; nasal : bool } + end module Repr = struct @@ -68,7 +81,10 @@ module S = struct { repr = "." ; muted = false ; kind = None - ; nasal = false } + ; nasal = false + ; code = None } + + let code t = t.code let nasal t = match t.repr with @@ -120,6 +136,9 @@ module S = struct let s () = { none with repr = "s" } + let sz () = + { (s()) with code = SZ } + let ch () = { none with repr = "S" } |