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/fixed.ml | |
| parent | af88c8895bba85fe5340b34aafb3dce7650bd01f (diff) | |
Use first type module instead of functors pt.2
Diffstat (limited to 'path/fixed.ml')
| -rwxr-xr-x | path/fixed.ml | 26 | 
1 files changed, 3 insertions, 23 deletions
| diff --git a/path/fixed.ml b/path/fixed.ml index 7203ebb..0ff4aad 100755 --- a/path/fixed.ml +++ b/path/fixed.ml @@ -13,33 +13,13 @@ module type P = sig  end -module type REPR = sig -  type t - -  type repr - -  (* Start a new path. *) -  val start -    : t -> repr -> repr - -  val line_to -    : t -> t -> repr -> repr - -  val quadratic_to -    : t -> Gg.v2 -> Gg.v2 -> t -> repr -> repr - -  val stop -    : repr -> repr -end - -  module Make(Point:P) = struct    module type BUILDER = sig      type t      val repr -      : t -> (module REPR with type t = Point.t and type repr = 's) -> 's -> 's +      : t -> (module Repr.M with type t = Point.t and type repr = 's) -> 's -> 's    end    type bezier = @@ -113,8 +93,8 @@ module Make(Point:P) = struct        }    let repr -    : t -> (module REPR with type t = Point.t and type repr = 's) -> 's -> 's -    = fun (type s) {path; _} (module Repr : REPR with type t = Point.t and type repr = s) 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 ->        let repr_bezier p bezier =          Repr.quadratic_to            bezier.p0 | 
