From a0c0803fdfc2c7ead9d0146029502ad37fcf858f Mon Sep 17 00:00:00 2001 From: Matt Bray Date: Tue, 16 Nov 2021 10:44:35 -0600 Subject: [PATCH] fix: back to t_let to avoid clashing with user's type t --- src-bs/shims_let_ops_.ml | 4 ++-- src/decoder.mli | 2 +- src/gen/mkshims.ml | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src-bs/shims_let_ops_.ml b/src-bs/shims_let_ops_.ml index 18d1d21..083c73a 100644 --- a/src-bs/shims_let_ops_.ml +++ b/src-bs/shims_let_ops_.ml @@ -10,9 +10,9 @@ module type I = sig end module type S = sig - type ('i, 'a, 'e) t + type ('i, 'a, 'e) t_let end module Make (X : I) = struct - type ('i, 'a, 'e) t = ('i, 'a, 'e) X.t + type ('i, 'a, 'e) t_let = ('i, 'a, 'e) X.t end diff --git a/src/decoder.mli b/src/decoder.mli index 5bd6f29..fd24457 100644 --- a/src/decoder.mli +++ b/src/decoder.mli @@ -29,7 +29,7 @@ module Infix : sig val ( <*> ) : ('i, 'a -> 'b, 'e) t -> ('i, 'a, 'e) t -> ('i, 'b, 'e) t - include Shims_let_ops_.S with type ('i, 'o, 'e) t = ('i, 'o, 'e) t + include Shims_let_ops_.S with type ('i, 'o, 'e) t_let = ('i, 'o, 'e) t end val fix : (('i, 'a, 'e) t -> ('i, 'a, 'e) t) -> ('i, 'a, 'e) t diff --git a/src/gen/mkshims.ml b/src/gen/mkshims.ml index 24a6be5..8394697 100644 --- a/src/gen/mkshims.ml +++ b/src/gen/mkshims.ml @@ -13,10 +13,10 @@ let shims_all = let shims_let_op_pre_408 = {| - module type S = sig type ('i, 'o, 'e) t end - module Make(X : I) : S with type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t = + module type S = sig type ('i, 'o, 'e) t_let end + module Make(X : I) : S with type ('i, 'o, 'e) t_let = ('i, 'o, 'e) X.t = struct - type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t + type ('i, 'o, 'e) t_let = ('i, 'o, 'e) X.t end |} @@ -24,16 +24,16 @@ let shims_let_op_pre_408 = let shims_let_op_post_408 = {| module type S = sig - type ('i, 'o, 'e) t - val ( let+ ) : ('i, 'a, 'e) t -> ('a -> 'b) -> ('i, 'b, 'e) t - val ( and+ ) : ('i, 'a, 'e) t -> ('i, 'b, 'e) t -> ('i, 'a * 'b, 'e) t - val ( let* ) : ('i, 'a, 'e) t -> ('a -> ('i, 'b, 'e) t) -> ('i, 'b, 'e) t - val ( and* ) : ('i, 'a, 'e) t -> ('i, 'b, 'e) t -> ('i, 'a * 'b, 'e) t + type ('i, 'o, 'e) t_let + val ( let+ ) : ('i, 'a, 'e) t_let -> ('a -> 'b) -> ('i, 'b, 'e) t_let + val ( and+ ) : ('i, 'a, 'e) t_let -> ('i, 'b, 'e) t_let -> ('i, 'a * 'b, 'e) t_let + val ( let* ) : ('i, 'a, 'e) t_let -> ('a -> ('i, 'b, 'e) t_let) -> ('i, 'b, 'e) t_let + val ( and* ) : ('i, 'a, 'e) t_let -> ('i, 'b, 'e) t_let -> ('i, 'a * 'b, 'e) t_let end - module Make(X : I) : S with type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t = + module Make(X : I) : S with type ('i, 'o, 'e) t_let = ('i, 'o, 'e) X.t = struct - type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t + type ('i, 'o, 'e) t_let = ('i, 'o, 'e) X.t let (let+) = X.(>|=) let (and+) = X.monoid_product let (let*) = X.(>>=)