summaryrefslogtreecommitdiff
path: root/src/lib/repr/rousseau.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/repr/rousseau.ml')
-rw-r--r--src/lib/repr/rousseau.ml16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/repr/rousseau.ml b/src/lib/repr/rousseau.ml
index f9fde05..5fff1cf 100644
--- a/src/lib/repr/rousseau.ml
+++ b/src/lib/repr/rousseau.ml
@@ -82,13 +82,18 @@ let add_voyel_to_glyph
| `Below -> { g with tehta_below = Some v }
type 'a t =
- | Consonant of 'a consonant
- | Voyel of 'a voyel
- | Application of ('a t -> 'a t list)
+ | Consonant: 'a consonant -> 'a t
+ | Voyel: 'a voyel -> 'a t
+ | Application: ('a t -> 'a t list) -> 'a t
| Repr of string
- | Glyph of 'a glyph
+ | Glyph: 'a glyph -> 'a t
| Nothing
+let voyel
+ : position_type -> ('a -> string) -> 'a t
+ = fun position app ->
+ Voyel { position ; app }
+
let none = Nothing
let space s = Repr s
@@ -144,8 +149,7 @@ let fold
| [] ->
begin match init with
| None -> ()
- | Some glyph ->
- repr_glyph ~portant glyph buff
+ | Some glyph -> repr_glyph ~portant glyph buff
end
| hd::tl ->
match init, hd with