Skip to content

Commit c2db60e

Browse files
committed
Revert "-BindReturn"
This reverts commit 78d8835.
1 parent 9ce1279 commit c2db60e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/FSharpPlus/Builders.fs

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module GenericBuilders =
4545
member inline __.Yield (x: 'T) = result x : '``Monad<'T>``
4646
member inline __.Bind (p: '``Monad<'T>``, rest: 'T->'``Monad<'U>``) = p >>= rest : '``Monad<'U>``
4747
member inline __.MergeSources (t1: '``Monad<'T>``, t2: '``Monad<'U>``) : '``Monad<'T * 'U>`` = Lift2.Invoke tuple2 t1 t2
48+
member inline __.BindReturn (x : '``Monad<'T>``, f: 'T -> 'U) : '``Monad<'U>`` = Map.Invoke f x
4849

4950
[<CustomOperation("select", MaintainsVariableSpaceUsingBind=true, AllowIntoPattern=true)>]
5051
member inline __.Select (x, [<ProjectionParameter>] f) = map f x

tests/FSharpPlus.Tests/General.fs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ module MonadTransformers =
18191819
let _ = put initialState : ChoiceT<State<int, Choice<unit,string>>>
18201820

18211821
()
1822-
1822+
#if APPLICATIVE_FIX
18231823
[<Test>]
18241824
let testStateT () =
18251825
let lst1: StateT<string,_> = StateT.lift [1;2]
@@ -1854,6 +1854,7 @@ module MonadTransformers =
18541854
areEqual (Ok 11) x
18551855
let y = (fn |> ResultT.run |> Reader.run) -1
18561856
areEqual (Error NegativeValue) y
1857+
#endif
18571858

18581859
module ProfunctorDefaults =
18591860
type Fun<'T,'U> = Fun of ('T -> 'U) with

tests/FSharpPlusFable.Tests/FSharpTests/General.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ let monadTransformers = testList "MonadTransformers" [
122122
let _ = put initialState : ChoiceT<State<int, Choice<unit,string>>>
123123

124124
())
125-
#if !NETSTANDARD3_0
125+
#if APPLICATIVE_FIX
126126
testCase "testStateT" (fun () ->
127127
let lst1: StateT<string,_> = StateT.lift [1;2]
128128
let lst2: StateT<string,_> = StateT.lift [4;5]

0 commit comments

Comments
 (0)