@@ -27,14 +27,14 @@ module WithMonad = (M: MONAD) => {
27
27
result, and the writer log.
28
28
" )
29
29
let evalRWST : 'a 'r 's 'w . ('r , 's , t <'a , 'r , 's , 'w >) => M .t <('a , 'w )> = (r , s , RWST (f )) =>
30
- f (r , s )-> ( M .map ((RWSResult (a , _s , w )) => (a , w ), _ ) )
30
+ f (r , s )-> M .map ((RWSResult (a , _s , w )) => (a , w ), _ )
31
31
32
32
@ocaml.doc ("
33
33
Same as runRWST, but discards the final result value, only returning the final
34
34
state, and the writer log.
35
35
" )
36
36
let execRWST : 'a 'r 's 'w . ('r , 's , t <'a , 'r , 's , 'w >) => M .t <('s , 'w )> = (r , s , RWST (f )) =>
37
- f (r , s )-> ( M .map ((RWSResult (_a , s , w )) => (s , w ), _ ) )
37
+ f (r , s )-> M .map ((RWSResult (_a , s , w )) => (s , w ), _ )
38
38
39
39
@ocaml.doc ("
40
40
Change the result type and writer log type. Note: this should normally allow
@@ -63,7 +63,7 @@ module WithMonad = (M: MONAD) => {
63
63
RWST (f ),
64
64
) => RWST (
65
65
(r , s ) =>
66
- f (r , s )-> ( M .map ((RWSResult .RWSResult (a , s , w )) => RWSResult .RWSResult (aToB (a ), s , w ), _ ) ),
66
+ f (r , s )-> M .map ((RWSResult .RWSResult (a , s , w )) => RWSResult .RWSResult (aToB (a ), s , w ), _ ),
67
67
)
68
68
69
69
let applyWithAppendLog : 'a 'b 'r 's 'w . (
@@ -95,7 +95,7 @@ module WithMonad = (M: MONAD) => {
95
95
(r1 , s1 ) =>
96
96
runA (r1 , s1 )-> M .flat_map ((RWSResult (a , s2 , w1 )) => {
97
97
let RWST (runB ) = aToRWSTB (a )
98
- runB (r1 , s2 )-> ( M .map ((RWSResult (b , s3 , w2 )) => RWSResult (b , s3 , appendLog (w1 , w2 )), _ ) )
98
+ runB (r1 , s2 )-> M .map ((RWSResult (b , s3 , w2 )) => RWSResult (b , s3 , appendLog (w1 , w2 )), _ )
99
99
}),
100
100
)
101
101
0 commit comments