From af88c8895bba85fe5340b34aafb3dce7650bd01f Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 1 Jan 2021 11:08:38 +0100 Subject: Use first type module instead of functors --- layer/svg.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'layer/svg.ml') 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") -- cgit v1.2.3