diff options
| author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-11 05:36:46 +0100 | 
|---|---|---|
| committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-11 13:55:43 +0100 | 
| commit | 979be5f588a1ffd6e1d060cd794e87526d517b7a (patch) | |
| tree | a96605b6ae27bcf646b17f022acf7f5f0cf0b8bf /path/fixed.ml | |
| parent | 85b40e5712fcbe76c697d1a22fb126db8079098c (diff) | |
Layer review
Diffstat (limited to 'path/fixed.ml')
| -rwxr-xr-x | path/fixed.ml | 14 | 
1 files changed, 7 insertions, 7 deletions
| 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 | 
