aboutsummaryrefslogtreecommitdiff
path: root/layer/svg.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-01-01 11:08:38 +0100
committerSébastien Dailly <sebastien@chimrod.com>2021-01-01 11:08:38 +0100
commitaf88c8895bba85fe5340b34aafb3dce7650bd01f (patch)
treeee0c9d1bd463242c681c6202a9a57c8110d58f59 /layer/svg.ml
parente25b7797708c19cbaef68c14ebef8738de44c2d9 (diff)
Use first type module instead of functors
Diffstat (limited to 'layer/svg.ml')
-rwxr-xr-xlayer/svg.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/layer/svg.ml b/layer/svg.ml
index f7cc670..2394cb8 100755
--- a/layer/svg.ml
+++ b/layer/svg.ml
@@ -12,15 +12,15 @@ let path: El.cons
= fun ?d ?at childs ->
El.v ?d ?at (Jstr.v "path") childs
-type 'a t = Jstr.t
+type t = Jstr.t
let create
- : unit -> 'a t
+ : unit -> t
= fun () -> Jstr.empty
(* Start a new path. *)
let move_to
- : Gg.v2 -> 'a t -> 'a t
+ : Gg.v2 -> t -> t
= fun point path ->
let x, y = V2.to_tuple point in
@@ -31,7 +31,7 @@ let move_to
; Jstr.of_float y ]
let line_to
- : Gg.v2 -> 'a t -> 'a t
+ : Gg.v2 -> t -> t
= fun point path ->
let x, y = V2.to_tuple point in
Jstr.concat ~sep:(Jstr.v " ")
@@ -41,7 +41,7 @@ let line_to
; (Jstr.of_float y) ]
let quadratic_to
- : Gg.v2 -> Gg.v2 -> Gg.v2 -> 'a t -> 'a t
+ : Gg.v2 -> Gg.v2 -> Gg.v2 -> t -> t
= fun ctrl0 ctrl1 p1 path ->
let cx, cy = V2.to_tuple ctrl0
and cx', cy' = V2.to_tuple ctrl1
@@ -59,6 +59,6 @@ let quadratic_to
; (Jstr.of_float y) ]
let close
- : 'a t -> 'a t
+ : t -> t
= fun path ->
Jstr.append path (Jstr.v " Z")