Skip to content

Commit 6c30108

Browse files
authored
+ Dict overload for Return
1 parent 5123a3e commit 6c30108

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/FSharpPlus/Control/Monad.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ type Return =
136136
static member Return (_: 'a Async , _: Return ) = fun (x: 'a) -> async.Return x
137137
static member Return (_: Result<'a,'e> , _: Return ) = fun x -> Ok x : Result<'a,'e>
138138
static member Return (_: Choice<'a,'e> , _: Return ) = fun x -> Choice1Of2 x : Choice<'a,'e>
139+
static member Return (_: IDictionary<'k,'t>, _: Return) = fun x -> Dict.initInfinite x : IDictionary<'k,'t>
139140
static member Return (_: Expr<'a> , _: Return ) = fun x -> Expr.Cast<'a> (Expr.Value (x: 'a))
140141
static member Return (_: ResizeArray<'a>, _: Return ) = fun x -> ResizeArray<'a> (Seq.singleton x)
141142

@@ -276,4 +277,4 @@ type Using with
276277
static member inline Using (resource: 'T when 'T :> IDisposable, body: 'T -> '``Monad<'U>`` , _: Using ) = Using.InvokeOnInstance resource body : '``Monad<'U>``
277278
static member inline Using (_ , _ : 'a -> ^t when ^t : null and ^t: struct , _: Using ) = ()
278279

279-
#endif
280+
#endif

0 commit comments

Comments
 (0)