From 74cd42c5cae6644914334448e198d562f4145511 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 1 Jan 2021 16:48:23 +0100 Subject: Use first type module instead of functors pt.2 --- path/fillPrinter.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'path/fillPrinter.ml') diff --git a/path/fillPrinter.ml b/path/fillPrinter.ml index ab5a1eb..76056c7 100755 --- a/path/fillPrinter.ml +++ b/path/fillPrinter.ml @@ -3,12 +3,12 @@ module Make(Repr: Layer.Repr.PRINTER) = struct type t = Point.t type repr = - { path: (Repr.t) - ; close : Repr.t -> unit + { path: Repr.t + ; close : Repr.t -> Repr.t } let create_path - : 'b -> repr + : (Repr.t -> Repr.t) -> repr = fun f -> { close = f ; path = Repr.create () @@ -33,7 +33,7 @@ module Make(Repr: Layer.Repr.PRINTER) = struct |> Repr.line_to (Point.get_coord p0) |> Repr.line_to (Point.get_coord p1) |> Repr.close in - t.close path; + let path = t.close path in { t with path} let quadratic_to @@ -56,7 +56,7 @@ module Make(Repr: Layer.Repr.PRINTER) = struct (Point.get_coord ctrl1') (Point.get_coord p1) |> Repr.close in - t.close path; + let path = t.close path in { t with path} -- cgit v1.2.3