From df92da631e9a10a099a72ba846f90adf99d180df Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 24 Aug 2021 15:04:25 +0200 Subject: Added pre-processing --- src/lib/sounds.ml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/lib/sounds.ml') 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" } -- cgit v1.2.3