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 --- path/fillPrinter.ml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'path/fillPrinter.ml') diff --git a/path/fillPrinter.ml b/path/fillPrinter.ml index b506f9b..ab5a1eb 100755 --- a/path/fillPrinter.ml +++ b/path/fillPrinter.ml @@ -2,13 +2,13 @@ module Make(Repr: Layer.Repr.PRINTER) = struct type t = Point.t - type 'a repr = - { path: ('a Repr.t) - ; close : 'a Repr.t -> unit + type repr = + { path: (Repr.t) + ; close : Repr.t -> unit } let create_path - : 'b -> 'a repr + : 'b -> repr = fun f -> { close = f ; path = Repr.create () @@ -16,7 +16,7 @@ module Make(Repr: Layer.Repr.PRINTER) = struct (* Start a new path. *) let start - : Point.t -> 'a repr -> 'a repr + : Point.t -> repr -> repr = fun t {close ; path } -> let path = Repr.move_to (Point.get_coord t) path in { close @@ -24,7 +24,7 @@ module Make(Repr: Layer.Repr.PRINTER) = struct } let line_to - : Point.t -> Point.t -> 'a repr -> 'a repr + : Point.t -> Point.t -> repr -> repr = fun p0 p1 t -> let path = Repr.move_to (Point.get_coord p1) t.path @@ -37,7 +37,7 @@ module Make(Repr: Layer.Repr.PRINTER) = struct { t with path} let quadratic_to - : Point.t -> Gg.v2 -> Gg.v2 -> Point.t -> 'a repr -> 'a repr + : Point.t -> Gg.v2 -> Gg.v2 -> Point.t -> repr -> repr = fun p0 ctrl0 ctrl1 p1 t -> let ctrl0' = Point.copy p1 ctrl0 @@ -61,12 +61,12 @@ module Make(Repr: Layer.Repr.PRINTER) = struct let stop - : 'a repr -> 'a repr + : repr -> repr = fun t -> t let get - : 'a repr -> 'a Repr.t + : repr -> Repr.t = fun t -> t.path end -- cgit v1.2.3