Skip to content

Commit f9b59a0

Browse files
committed
Fix forward/backward applicatives in Compose
1 parent 42b8779 commit f9b59a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/FSharpPlus/Data/Compose.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type Compose<'``functorF<'functorG<'t>>``> = Compose of '``functorF<'functorG<'t
1818
/// To be used in Applicative Style expressions, combined with &lt;*&gt;
1919
/// </summary>
2020
/// <category index="1">Functor</category>
21-
static member inline (<!>) (f: 'T -> 'U, x: '``FunctorF<'FunctorG<'T>>``) =
21+
static member inline (<!>) (f: 'T -> 'U, Compose (x: '``FunctorF<'FunctorG<'T>>``)) =
2222
Compose (map (map f: '``FunctorG<'T>`` -> '``FunctorG<'U>``) x : '``FunctorF<'FunctorG<'U>>``)
2323

2424
// Applicative
@@ -32,14 +32,14 @@ type Compose<'``functorF<'functorG<'t>>``> = Compose of '``functorF<'functorG<'t
3232
/// Sequences two composed applicatives left-to-right, discarding the value of the first argument.
3333
/// </summary>
3434
/// <category index="2">Applicative</category>
35-
static member inline ( *>) (x: '``FunctorF<'FunctorG<'T>>``, y: '``FunctorF<'FunctorG<'U>>``) : '``FunctorF<'FunctorG<'U>>`` =
35+
static member inline ( *>) (x: Compose<'``FunctorF<'FunctorG<'T>>``>, y: Compose<'``FunctorF<'FunctorG<'U>>``>) : Compose<'``FunctorF<'FunctorG<'U>>``> =
3636
((fun (_: 'T) (k: 'U) -> k) <!> x : '``FunctorF<'FunctorG<'U -> 'U>>``) <*> y
3737

3838
/// <summary>
3939
/// Sequences two composed applicatives left-to-right, discarding the value of the second argument.
4040
/// </summary>
4141
/// <category index="2">Applicative</category>
42-
static member inline (<* ) (x: '``FunctorF<'FunctorG<'U>>``, y: '``FunctorF<'FunctorG<'T>>``): '``FunctorF<'FunctorG<'U>>`` =
42+
static member inline (<* ) (x: Compose<'``FunctorF<'FunctorG<'U>>``>, y: Compose<'``FunctorF<'FunctorG<'T>>``>) : Compose<'``FunctorF<'FunctorG<'U>>``> =
4343
((fun (k: 'U) (_: 'T) -> k) <!> x : '``FunctorF<'FunctorG<'T -> 'U>>``) <*> y
4444

4545
static member inline Lift2 (f: 'T -> 'U -> 'V, Compose (x: '``ApplicativeF<'ApplicativeG<'T>``), Compose (y: '``ApplicativeF<'ApplicativeG<'U>``)) =

0 commit comments

Comments
 (0)