114.04+40

This commit is contained in:
Jeremie Dimino 2016-08-03 18:29:31 +01:00
parent 5b5b67ce65
commit ee1c44b56e
3 changed files with 4 additions and 9 deletions

2
_oasis
View File

@ -2,7 +2,7 @@ OASISFormat: 0.4
OCamlVersion: >= 4.03.0 OCamlVersion: >= 4.03.0
FindlibVersion: >= 1.3.2 FindlibVersion: >= 1.3.2
Name: ppx_let Name: ppx_let
Version: 114.03+54 Version: 114.04+40
Synopsis: Monadic let-bindings Synopsis: Monadic let-bindings
Authors: Jane Street Group, LLC <opensource@janestreet.com> Authors: Jane Street Group, LLC <opensource@janestreet.com>
Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com> Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>

View File

@ -56,14 +56,9 @@ let expand_with_tmp_vars ~loc bindings expr ~f =
;; ;;
let bind_apply ~loc extension_name ~arg ~fn = let bind_apply ~loc extension_name ~arg ~fn =
let fn_label =
match (extension_name : Extension_name.t) with
| Bind | Bind_open -> ""
| Map | Map_open -> "f"
in
pexp_apply ~loc pexp_apply ~loc
(eoperator ~loc (Extension_name.operator_name extension_name)) (eoperator ~loc (Extension_name.operator_name extension_name))
[(Nolabel, arg); (Labelled fn_label, fn)] [(Nolabel, arg); (Labelled "f", fn)]
;; ;;
let maybe_open extension_name ~to_open:module_to_open expr = let maybe_open extension_name ~to_open:module_to_open expr =

View File

@ -6,7 +6,7 @@ module Monad_example = struct
val return : 'a -> 'a t val return : 'a -> 'a t
module Let_syntax : sig module Let_syntax : sig
val return : 'a -> 'a t val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t val bind : 'a t -> f:('a -> 'b t) -> 'b t
val map : 'a t -> f:('a -> 'b) -> 'b t val map : 'a t -> f:('a -> 'b) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t val both : 'a t -> 'b t -> ('a * 'b) t
module Open_on_rhs : sig val return : 'a -> 'a t end module Open_on_rhs : sig val return : 'a -> 'a t end
@ -15,7 +15,7 @@ module Monad_example = struct
end = struct end = struct
type 'a t = 'a type 'a t = 'a
let return x = x let return x = x
let bind x f = f x let bind x ~f = f x
let map x ~f = f x let map x ~f = f x
let both x y = (x, y) let both x y = (x, y)
module Let_syntax = struct module Let_syntax = struct