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
<ExecCommand='dotnet test --blame-hang-timeout 30s tests/FSharpPlus.Tests -c Release --logger:trx'WorkingDirectory="$(RepoRootDir)"IgnoreStandardErrorWarningFormat="true" />
18
+
<ExecCommand='dotnet test --blame-hang-timeout 30s tests/FSharpPlus.Tests -c Test --logger:trx'WorkingDirectory="$(RepoRootDir)"IgnoreStandardErrorWarningFormat="true" />
static member inlineInvokeOnInstance f (t:^a)=(^a:(static memberTraverse:_*_-> 'R) t, f)
34
34
35
35
static member inlineTraverse(t:'``Traversable<'T>`` ,f:'T->'``Functor<'U>``,[<Optional>]_output:'``Functor<'Traversable<'U>>``,[<Optional>]_impl:Default4)=
36
-
letmapped= Map.Invoke f t : '``Traversable<'Functor<'U>>``
static member inlineTraverse(t:option<_>,f,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =match t with Some x -> Map.Invoke Some (f x)|_-> result None
82
-
static member inlineTraverse(t:voption<_>,f,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =match t with ValueSome x -> Map.Invoke ValueSome (f x)|_-> result ValueNone
static member inlineTraverse(t:option<_>,f,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =
117
+
#if TEST_TRACE
118
+
Traces.add "Traverse option"
119
+
#endif
120
+
match t with Some x -> Map.Invoke Some (f x)|_-> result None
121
+
static member inlineTraverse(t:voption<_>,f,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =
122
+
#if TEST_TRACE
123
+
Traces.add "Traverse voption"
124
+
#endif
125
+
match t with ValueSome x -> Map.Invoke ValueSome (f x)|_-> result ValueNone
83
126
84
127
static member inlineTraverse(t:Map<_,_>,f,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =
85
-
letinsert_f m k v = Map.Invoke (Map.add k) v <*> m
86
-
Map.fold insert_f (result Map.empty)(Map.mapValues f t)
128
+
#if TEST_TRACE
129
+
Traces.add "Traverse Map"
130
+
#endif
131
+
letinsert_f m k v = Map.Invoke (Map.add k) v <*> m
132
+
Map.fold insert_f (result Map.empty)(Map.mapValues f t)
87
133
88
134
static member inlineTraverse(t:Result<'T,'Error>,f:'T->'``Functor<'U>``,[<Optional>]_output:'``Functor<Result<'U,'Error>>``,[<Optional>]_impl:Traverse):'``Functor<Result<'U,'Error>>`` =
89
-
match t with
90
-
| Ok a -> Map.Invoke Result<'U,'Error>.Ok (f a)
91
-
| Error e -> Return.Invoke (Result<'U,'Error>.Error e)
135
+
#if TEST_TRACE
136
+
Traces.add "Traverse Result, 'T->Functor<'U>"
137
+
#endif
138
+
match t with
139
+
| Ok a -> Map.Invoke Result<'U,'Error>.Ok (f a)
140
+
| Error e -> Return.Invoke (Result<'U,'Error>.Error e)
92
141
93
142
static member inlineTraverse(t:Choice<'T,'Error>,f:'T->'``Functor<'U>``,[<Optional>]_output:'``Functor<Choice<'U,'Error>>``,[<Optional>]_impl:Traverse):'``Functor<Choice<'U,'Error>>`` =
94
-
match t with
95
-
| Choice1Of2 a -> Map.Invoke Choice<'U,'Error>.Choice1Of2 (f a)
96
-
| Choice2Of2 e -> Return.Invoke (Choice<'U,'Error>.Choice2Of2 e)
143
+
#if TEST_TRACE
144
+
Traces.add "Traverse Choice, 'T->Functor<'U>"
145
+
#endif
146
+
match t with
147
+
| Choice1Of2 a -> Map.Invoke Choice<'U,'Error>.Choice1Of2 (f a)
148
+
| Choice2Of2 e -> Return.Invoke (Choice<'U,'Error>.Choice2Of2 e)
97
149
98
150
static member inlineTraverse(t:list<_>,f ,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =
99
-
let recloop acc =function
100
-
|[]-> acc
101
-
| x::xs ->
102
-
letv= f x
103
-
loop (v::acc) xs
104
-
letcons_f x xs = Map.Invoke List.cons xs <*> x
105
-
List.fold cons_f (result [])(loop [] t)
151
+
#if TEST_TRACE
152
+
Traces.add "Traverse list"
153
+
#endif
154
+
let recloop acc =function
155
+
|[]-> acc
156
+
| x::xs ->
157
+
letv= f x
158
+
loop (v::acc) xs
159
+
letcons_f x xs = Map.Invoke List.cons xs <*> x
160
+
List.fold cons_f (result [])(loop [] t)
106
161
107
162
static member inlineTraverse(t:_ [],f ,[<Optional>]_output:'R,[<Optional>]_impl:Traverse):'R =
108
-
letcons x y = Array.append [|x|] y
109
-
let recloop acc =function
110
-
|[||]-> acc
111
-
| xxs ->
112
-
letx,xs = Array.head xxs, Array.tail xxs
113
-
letv= f x
114
-
loop (cons v acc) xs
115
-
letcons_f x xs = Map.Invoke cons xs <*> x
116
-
Array.fold cons_f (result [||])(loop [||] t)
163
+
#if TEST_TRACE
164
+
Traces.add "Traverse []"
165
+
#endif
166
+
letcons x y = Array.append [|x|] y
167
+
let recloop acc =function
168
+
|[||]-> acc
169
+
| xxs ->
170
+
letx,xs = Array.head xxs, Array.tail xxs
171
+
letv= f x
172
+
loop (cons v acc) xs
173
+
letcons_f x xs = Map.Invoke cons xs <*> x
174
+
Array.fold cons_f (result [||])(loop [||] t)
117
175
118
176
static member inlineInvoke(f:'T->'``Functor<'U>``)(t:'``Traversable<'T>``):'``Functor<'Traversable<'U>>`` =
119
177
let inlinecall_3(a:^a,b:^b,c:^c,f)=((^aor^bor^c):(static memberTraverse:_*_*_*_->_) b, f, c, a)
0 commit comments