diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-01 16:48:23 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-01 16:48:23 +0100 |
commit | 74cd42c5cae6644914334448e198d562f4145511 (patch) | |
tree | d502e0798a04566c16d345c194ce725330631145 /path/fillPrinter.ml | |
parent | af88c8895bba85fe5340b34aafb3dce7650bd01f (diff) |
Use first type module instead of functors pt.2
Diffstat (limited to 'path/fillPrinter.ml')
-rwxr-xr-x | path/fillPrinter.ml | 10 |
1 files changed, 5 insertions, 5 deletions
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} |