From 979be5f588a1ffd6e1d060cd794e87526d517b7a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 11 Jan 2021 05:36:46 +0100 Subject: Layer review --- path/fixed.ml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'path/fixed.ml') diff --git a/path/fixed.ml b/path/fixed.ml index 08b9c2b..2eda3c1 100755 --- a/path/fixed.ml +++ b/path/fixed.ml @@ -24,7 +24,7 @@ module Make(Point:P) = struct type t val repr - : t -> (module Repr.M with type t = Point.t and type repr = 's) -> 's -> 's + : t -> (module Repr.M with type point = Point.t and type t = 's) -> 's -> 's end type path = @@ -47,9 +47,9 @@ module Make(Point:P) = struct = fun {id; _} -> id module ToFixed = struct - type t = Point.t + type point = Point.t - type repr = int * step list + type t = int * step list let create_path () = 0, [] @@ -59,7 +59,7 @@ module Make(Point:P) = struct t let line_to - : t -> t -> repr -> repr + : point -> point -> t -> t = fun p1 p2 (i, t) -> ( i + 1 , { point = p1 @@ -67,7 +67,7 @@ module Make(Point:P) = struct }:: t ) let quadratic_to - : (t * Gg.v2 * Gg.v2 * t) -> repr -> repr + : (point * Gg.v2 * Gg.v2 * point) -> t -> t = fun (p0, ctrl0, ctrl1, p1) (i, t) -> let curve = Curve { ctrl0 @@ -105,8 +105,8 @@ module Make(Point:P) = struct } let repr - : t -> (module Repr.M with type t = Point.t and type repr = 's) -> 's -> 's - = fun (type s) {path; _} (module Repr : Repr.M with type t = Point.t and type repr = s) repr -> + : t -> (module Repr.M with type point = Point.t and type t = 's) -> 's -> 's + = fun (type s) {path; _} (module Repr : Repr.M with type point = Point.t and type t = s) repr -> let repr_bezier p p0 bezier = Repr.quadratic_to ( p0 -- cgit v1.2.3