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/linePrinter.ml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'path/linePrinter.ml') diff --git a/path/linePrinter.ml b/path/linePrinter.ml index 247d554..e109e4a 100755 --- a/path/linePrinter.ml +++ b/path/linePrinter.ml @@ -2,19 +2,19 @@ module Repr = Layer.CanvaPrinter type t = Point.t -type 'a repr = - { path: ('a Repr.t) +type repr = + { path: (Repr.t) } let create_path - : 'b -> 'a repr + : 'b -> repr = fun _ -> { path = Repr.create () } (* Start a new path. *) let start - : Point.t -> 'a repr -> 'a repr + : Point.t -> repr -> repr = fun t {path} -> let path = Repr.move_to (Point.get_coord t) path in let path = Repr.line_to (Point.get_coord' t) path in @@ -22,7 +22,7 @@ let start } let line_to - : Point.t -> Point.t -> 'a repr -> 'a repr + : Point.t -> Point.t -> repr -> repr = fun _ t {path} -> let path = Repr.move_to (Point.get_coord t) path in let path = Repr.line_to (Point.get_coord' t) path in @@ -30,7 +30,7 @@ let line_to } 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 {path} -> let path = Repr.move_to (Point.get_coord p1) path in @@ -40,7 +40,7 @@ let quadratic_to } let stop - : 'a repr -> 'a repr + : repr -> repr = fun {path} -> @@ -48,6 +48,6 @@ let stop } let get - : 'a repr -> 'a Repr.t + : repr -> Repr.t = fun {path; _} -> path -- cgit v1.2.3