Skip to content

Commit

Permalink
fix: back to t_let to avoid clashing with user's type t
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjbray committed Nov 16, 2021
1 parent c69f0ef commit a0c0803
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src-bs/shims_let_ops_.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/decoder.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/gen/mkshims.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ 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
|}


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.(>>=)
Expand Down

0 comments on commit a0c0803

Please sign in to comment.