diff --git a/_oasis b/_oasis index 249d3059d..2f8bfc78b 100644 --- a/_oasis +++ b/_oasis @@ -2,7 +2,7 @@ OASISFormat: 0.4 OCamlVersion: >= 4.03.0 FindlibVersion: >= 1.3.2 Name: ppx_let -Version: 114.03+54 +Version: 114.04+40 Synopsis: Monadic let-bindings Authors: Jane Street Group, LLC Copyrights: (C) 2015-2016 Jane Street Group LLC diff --git a/src/ppx_let.ml b/src/ppx_let.ml index ce38f4e08..7c5c3198c 100644 --- a/src/ppx_let.ml +++ b/src/ppx_let.ml @@ -56,14 +56,9 @@ let expand_with_tmp_vars ~loc bindings expr ~f = ;; 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 (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 = diff --git a/test/test.ml b/test/test.ml index 0dc4960fe..90de6a874 100644 --- a/test/test.ml +++ b/test/test.ml @@ -6,7 +6,7 @@ module Monad_example = struct val return : 'a -> 'a t module Let_syntax : sig 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 both : 'a t -> 'b t -> ('a * 'b) t module Open_on_rhs : sig val return : 'a -> 'a t end @@ -15,7 +15,7 @@ module Monad_example = struct end = struct type 'a t = 'a let return x = x - let bind x f = f x + let bind x ~f = f x let map x ~f = f x let both x y = (x, y) module Let_syntax = struct