You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let recloop(f:'T->'U)(x:Free<'``Functor<'T>``,'T>):Free<'``Functor<'U>``,'U>=
37
+
let recloop(f:'T->'U)(x:Free<'Functor,'T>):Free<'Functor,'U>=
38
38
match run x with
39
39
| Pure x -> Pure (f x)
40
-
| Roll (x:^``Functor<Free<'Functor<'T>,'T>>``)-> Roll (Map.Invoke (loop f : Free<'``Functor<'T>``,'T>->_) x:^``Functor<Free<'Functor<'U>,'U>>``)
40
+
| Roll (x:^``Functor<Free<'Functor, 'T>>``)-> Roll (Map.Invoke (loop f : Free<'Functor,'T>->_) x:^``Functor<Free<'Functor, 'U>>``)
41
41
loop f x
42
42
43
-
let inlinebind(f:'T ->Free<'``Functor<'U>``,'U>)(x:Free<'``Functor<'T>``,'T>):Free<'``Functor<'U>``,'U>=
43
+
let inlinebind(f:'T ->Free<'Functor,'U>)(x:Free<'Functor,'T>):Free<'Functor,'U>=
44
44
let recloop f (x:Free<_,_>)=
45
45
match run x with
46
46
| Pure r -> f r
47
-
| Roll (x:^``Functor<Free<'Functor<'T>,'T>>``)-> Roll (Map.Invoke (loop f : Free<'``Functor<'T>``,'T>->_) x:^``Functor<Free<'Functor<'U>,'U>>``): Free<'``Functor<'U>``,'U>
47
+
| Roll (x:^``Functor<Free<'Functor, 'T>>``)-> Roll (Map.Invoke (loop f : Free<'Functor,'T>->_) x:^``Functor<Free<'Functor, 'U>>``): Free<'Functor,'U>
48
48
loop f x
49
49
50
-
let inlineapply(f:Free<'``Functor<'T->'U>``,'T->'U>)(x:Free<'``Functor<'T>``,'T>):Free<'``Functor<'U>``,'U>=
50
+
let inlineapply(f:Free<'Functor,'T->'U>)(x:Free<'Functor,'T>):Free<'Functor,'U>=
51
51
let recloop(x:Free<_,_>)(f:Free<_,_>)=
52
52
match run f with
53
-
| Pure f -> map<'T,'U,'``Functor<'T>``,'``Functor<Free<'Functor<'T>,'T>>``,'``Functor<Free<'Functor<'U>,'U>>``,'``Functor<'U>``> f x : Free<'``Functor<'U>``,'U>
54
-
| Roll (f:^``Functor<Free<'Functor<'T->'U>,'T->'U>>``)-> Roll (Map.Invoke (loop x: Free<'``Functor<'T->'U>``,'T->'U>->_) f: '``Functor<Free<'Functor<'U>,'U>>``)
53
+
| Pure f -> map<'T,'U, 'Functor,'``Functor<Free<'Functor, 'T>>``,'``Functor<Free<'Functor, 'U>>``> f x : Free<'Functor,'U>
54
+
| Roll (f:^``Functor<Free<'Functor, ('T -> 'U)>>``)-> Roll (Map.Invoke (loop x: Free<'Functor,('T -> 'U)>->_) f: '``Functor<Free<'Functor, 'U>>``)
55
55
loop x f
56
56
57
-
let inlinemap2(f:'T->'U->'V)(x:Free<'``Functor<'T>``,'T>)(y:Free<'``Functor<'U>``,'U>):Free<'``Functor<'V>``,'V>=
57
+
let inlinemap2(f:'T->'U->'V)(x:Free<'Functor,'T>)(y:Free<'Functor,'U>):Free<'Functor,'V>=
58
58
let recloop(y:Free<_,_>)(x:Free<_,_>)=
59
59
match run x with
60
-
| Pure x -> map<'U,'V,'``Functor<'U>``,'``Functor<Free<'Functor<'U>,'U>>``,'``Functor<Free<'Functor<'V>,'V>>``,'``Functor<'V>``>(f x) y : Free<'``Functor<'V>``,'V>
61
-
| Roll (x:^``Functor<Free<'Functor<'T>,'T>>``)-> Roll (Map.Invoke (loop y: Free<'``Functor<'T>``,'T>->_) x: '``Functor<Free<'Functor<'V>,'V>>``)
60
+
| Pure x -> map<'U,'V, 'Functor,'``Functor<Free<'Functor, 'U>>``,'``Functor<Free<'Functor, 'V>>``>(f x) y : Free<'Functor,'V>
61
+
| Roll (x:^``Functor<Free<'Functor, 'T>>``)-> Roll (Map.Invoke (loop y: Free<'Functor,'T>->_) x: '``Functor<Free<'Functor, 'V>>``)
62
62
loop y x
63
63
64
-
let inlinemap3(f:'T->'U->'V->'W)(x:Free<'``Functor<'T>``,'T>)(y:Free<'``Functor<'U>``,'U>)(z:Free<'``Functor<'V>``,'V>):Free<'``Functor<'W>``,'W>=
64
+
let inlinemap3(f:'T->'U->'V->'W)(x:Free<'Functor,'T>)(y:Free<'Functor,'U>)(z:Free<'Functor,'V>):Free<'Functor,'W>=
65
65
let recloop(y:Free<_,_>)(x:Free<_,_>)(z:Free<_,_>)=
66
66
match run x with
67
-
| Pure x -> map2<'U,'V,'W,'``Functor<'U>``,'``Functor<Free<'Functor<'U>,'U>>``,'``Functor<Free<'Functor<'V>,'V>>``,'``Functor<Free<'Functor<'W>,'W>>``,'``Functor<'V>``,'``Functor<'W>``>(f x) y z : Free<'``Functor<'W>``,'W>
68
-
| Roll (x:^``Functor<Free<'Functor<'T>,'T>>``)-> Roll (Map.Invoke (loop y: Free<'``Functor<'T>``,'T>->_) x: '``Functor<Free<'Functor<'W>,'W>>``)
67
+
| Pure x -> map2<'U,'V,'W, 'Functor,'``Functor<Free<'Functor, 'U>>``,'``Functor<Free<'Functor, 'V>>``,'``Functor<Free<'Functor, 'W>>``>(f x) y z : Free<'Functor,'W>
68
+
| Roll (x:^``Functor<Free<'Functor, 'T>>``)-> Roll (Map.Invoke (loop y: Free<'Functor,'T>->_) x: '``Functor<Free<'Functor, 'W>>``)
69
69
loop y x z
70
70
71
71
/// Folds the Free structure into a Monad
72
-
let inlinefold(f:'``Functor<'T>`` ->'``Monad<'T>``)(x:Free<'``Functor<'U>``,'U>):'``Monad<'U>`` =
72
+
let inlinefold(f:'``Functor<'T>`` ->'``Monad<'T>``)(x:Free<'Functor,'U>):'``Monad<'U>`` =
73
73
let recloop f x =
74
74
match run x with
75
75
| Pure a -> Return.Invoke a
76
76
| Roll x -> f x >>= loop f
77
77
loop f x
78
78
79
79
/// Tear down a Free monad using iteration.
80
-
let inlineiterM(f:'``Functor<'Monad<'T>>`` ->'``Monad<'T>``)(x:Free<'``Functor<'T>``,'T>):'``Monad<'T>`` =
80
+
let inlineiterM(f:'``Functor<'Monad<'T>>`` ->'``Monad<'T>``)(x:Free<'Functor,'T>):'``Monad<'T>`` =
81
81
let recloop f x =
82
82
match run x with
83
83
| Pure x -> Return.Invoke x
84
-
| Roll (x:^``Functor<Free<'Functor<'T>,'T>>``)-> f (loop f <!> x)
84
+
| Roll (x:^``Functor<Free<'Functor, 'T>>``)-> f (loop f <!> x)
85
85
loop f x
86
86
87
87
/// Lift any Functor into a Free structure
88
-
let inlineliftF(x:'``Functor<'T>``):Free<'``Functor<'T>``,'T>= Roll (Map.Invoke (Pure: 'T -> Free<'``Functor<'T>``,'T>) x : '``Functor<Free<'Functor<'T>,'T>>``)
88
+
let inlineliftF(x:'``Functor<'T>``):Free<'Functor,'T>= Roll (Map.Invoke (Pure: 'T -> Free<'Functor,'T>) x : '``Functor<Free<'Functor, 'T>>``)
89
89
90
90
91
-
typeFree<'``functor<'t>``,'t>with
91
+
typeFree<'functor,'t>with
92
92
93
93
[<EditorBrowsable(EditorBrowsableState.Never)>]
94
-
static member inlineMap(x:Free<'``Functor<'T>``,'T>,f:'T ->'U)= Free.map f x : Free<'``Functor<'U>``,'U>
94
+
static member inlineMap(x:Free<'Functor,'T>,f:'T ->'U)= Free.map f x : Free<'Functor,'U>
95
95
96
96
static memberReturn x = Pure x
97
-
static member inline(>>=)(x: Free<'``Functor<'T>``,'T>, f: 'T -> Free<'``Functor<'U>``,'U>)= Free.bind f x : Free<'``Functor<'U>``,'U>
98
-
static member inline(<*>)(f:Free<'``Functor<'T->'U>``,'T->'U>,x:Free<'``Functor<'T>``,'T>)= Free.apply f x : Free<'``Functor<'U>``,'U>
97
+
static member inline(>>=)(x: Free<'Functor,'T>, f: 'T -> Free<'Functor,'U>)= Free.bind f x : Free<'Functor,'U>
98
+
static member inline(<*>)(f:Free<'Functor,('T -> 'U)>,x:Free<'Functor,'T>)= Free.apply f x : Free<'Functor,'U>
99
99
100
100
[<EditorBrowsable(EditorBrowsableState.Never)>]
101
-
static member inlineLift2(f,x:Free<'``Functor<'T>``,'T>,y:Free<'``Functor<'U>``,'U>)= Free.map2 f x y: Free<'``Functor<'V>``,'V>
101
+
static member inlineLift2(f,x:Free<'Functor,'T>,y:Free<'Functor,'U>)= Free.map2 f x y: Free<'Functor,'V>
102
102
103
103
[<EditorBrowsable(EditorBrowsableState.Never)>]
104
-
static member inlineLift3(f,x:Free<'``Functor<'T>``,'T>,y:Free<'``Functor<'U>``,'U>,z:Free<'``Functor<'V>``,'V>)= Free.map3 f x y z: Free<'``Functor<'W>``,'W>
104
+
static member inlineLift3(f,x:Free<'Functor,'T>,y:Free<'Functor,'U>,z:Free<'Functor,'V>)= Free.map3 f x y z: Free<'Functor,'W>
105
105
106
-
static memberDelay(x:unit ->Free<'``Functor<'T>``,'T>)= x ()
106
+
static memberDelay(x:unit ->Free<'Functor,'T>)= x ()
0 commit comments