From a5a7c84bb7b3fc7d336027cd16d21d6ad3049781 Mon Sep 17 00:00:00 2001 From: gusty <1261319+gusty@users.noreply.github.com> Date: Sun, 19 Nov 2023 08:09:35 +0100 Subject: [PATCH] Fix code alignment for traversable --- src/FSharpPlus/Control/Traversable.fs | 313 +++++++++++++------------- tests/FSharpPlus.Tests/Traversals.fs | 2 +- 2 files changed, 159 insertions(+), 156 deletions(-) diff --git a/src/FSharpPlus/Control/Traversable.fs b/src/FSharpPlus/Control/Traversable.fs index 485e69d1a..9b4363c3d 100644 --- a/src/FSharpPlus/Control/Traversable.fs +++ b/src/FSharpPlus/Control/Traversable.fs @@ -7,13 +7,12 @@ open System.ComponentModel open FSharpPlus open FSharpPlus.Data open FSharpPlus.Internals -open FSharpPlus.Internals.Prelude open FSharpPlus.Internals.MonadOps open FSharpPlus.Extensions type Sequence = inherit Default1 - static member inline InvokeOnInstance (t: '``Traversable>``) = (^``Traversable>`` : (static member Sequence : _ -> _) t) : '``Functor<'Traversable<'T>>`` + static member inline InvokeOnInstance (t: '``Traversable<'Functor<'T>>``) = (^``Traversable<'Functor<'T>>`` : (static member Sequence : _ -> _) t) : '``Functor<'Traversable<'T>>`` [] static member inline ForInfiniteSequences (t: seq<_>, isFailure, conversion) = @@ -28,150 +27,152 @@ type Sequence = type Traverse = inherit Default1 - static member inline InvokeOnInstance f (t: ^a) = (^a : (static member Traverse : _*_ -> 'R) t, f) + static member inline InvokeOnInstance f (t: ^a) = (^a : (static member Traverse : _ * _ -> 'R) t, f) - static member inline Traverse (t: '``Traversable<'T>`` , f: 'T->'``Functor<'U>``, []_output: '``Functor<'Traversable<'U>>``, []_impl: Default4) = - #if TEST_TRACE - Traces.add "Traverse 'Traversable, 'T->Functor<'U>" - #endif - let mapped = Map.Invoke f t : '``Traversable<'Functor<'U>>`` - (^``Traversable<'T>`` : (static member Sequence : _ -> _) mapped) : '``Functor<'Traversable<'U>>`` + static member inline Traverse (t: '``Traversable<'T>``, f: 'T -> '``Functor<'U>``, []_output: '``Functor<'Traversable<'U>>``, []_impl: Default4) = + #if TEST_TRACE + Traces.add "Traverse 'Traversable, 'T -> Functor<'U>" + #endif + let mapped = Map.Invoke f t : '``Traversable<'Functor<'U>>`` + (^``Traversable<'T>`` : (static member Sequence : _ -> _) mapped) : '``Functor<'Traversable<'U>>`` static member inline Traverse (t: Id<_>, f, []_output: 'R, []_impl: Default3) = - #if TEST_TRACE - Traces.add "Traverse Id" - #endif - Map.Invoke Id.create (f (Id.run t)) + #if TEST_TRACE + Traces.add "Traverse Id" + #endif + Map.Invoke Id.create (f (Id.run t)) static member inline Traverse (t: _ seq, f, []_output: 'R, []_impl: Default3) = - #if TEST_TRACE - Traces.add "Traverse seq" - #endif - let cons x y = seq {yield x; yield! y} - let cons_f x ys = Map.Invoke (cons: 'a->seq<_>->seq<_>) (f x) <*> ys - Seq.foldBack cons_f t (result Seq.empty) + #if TEST_TRACE + Traces.add "Traverse seq" + #endif + let cons x y = seq {yield x; yield! y} + let cons_f x ys = Map.Invoke (cons: 'a -> seq<_> -> seq<_>) (f x) <*> ys + Seq.foldBack cons_f t (result Seq.empty) static member inline Traverse (t: _ NonEmptySeq, f, []_output: 'R, []_impl: Default3) = - #if TEST_TRACE - Traces.add "Traverse NonEmptySeq" - #endif - let cons x y = seq {yield x; yield! y} - let cons_f x ys = Map.Invoke (cons: 'a->seq<_>->seq<_>) (f x) <*> ys - Map.Invoke NonEmptySeq.ofSeq (Seq.foldBack cons_f t (result Seq.empty)) - - static member inline Traverse (t: seq<'T>, f: 'T->'``Functor<'U>``, []_output: '``Functor>``, []_impl: Default2) = - #if TEST_TRACE - Traces.add "Traverse seq, 'T->Functor<'U>" - #endif - let mapped = Seq.map f t - Sequence.ForInfiniteSequences (mapped, IsLeftZero.Invoke, List.toSeq) : '``Functor>`` - - static member inline Traverse (t: NonEmptySeq<'T>, f: 'T->'``Functor<'U>``, []_output: '``Functor>``, []_impl: Default2) = - #if TEST_TRACE - Traces.add "Traverse NonEmptySeq, 'T->Functor<'U>" - #endif - let mapped = NonEmptySeq.map f t - Sequence.ForInfiniteSequences (mapped, IsLeftZero.Invoke, NonEmptySeq.ofList) : '``Functor>`` - - static member inline Traverse (t: ^a , f, []_output: 'R, []_impl: Default1) = - #if TEST_TRACE - Traces.add "Traverse ^a" - #endif - Traverse.InvokeOnInstance f t : 'R - static member inline Traverse (_: ^a when ^a : null and ^a :struct, _, _: 'R , _impl: Default1) = id + #if TEST_TRACE + Traces.add "Traverse NonEmptySeq" + #endif + let cons x y = seq {yield x; yield! y} + let cons_f x ys = Map.Invoke (cons: 'a -> seq<_> -> seq<_>) (f x) <*> ys + Map.Invoke NonEmptySeq.ofSeq (Seq.foldBack cons_f t (result Seq.empty)) + + static member inline Traverse (t: seq<'T>, f: 'T -> '``Functor<'U>``, []_output: '``Functor>``, []_impl: Default2) = + #if TEST_TRACE + Traces.add "Traverse seq, 'T -> Functor<'U>" + #endif + let mapped = Seq.map f t + Sequence.ForInfiniteSequences (mapped, IsLeftZero.Invoke, List.toSeq) : '``Functor>`` + + static member inline Traverse (t: NonEmptySeq<'T>, f: 'T -> '``Functor<'U>``, []_output: '``Functor>``, []_impl: Default2) = + #if TEST_TRACE + Traces.add "Traverse NonEmptySeq, 'T -> Functor<'U>" + #endif + let mapped = NonEmptySeq.map f t + Sequence.ForInfiniteSequences (mapped, IsLeftZero.Invoke, NonEmptySeq.ofList) : '``Functor>`` + + static member inline Traverse (t: ^a, f, []_output: 'R, []_impl: Default1) : 'R = + #if TEST_TRACE + Traces.add "Traverse ^a" + #endif + Traverse.InvokeOnInstance f t + static member inline Traverse (_: ^a when ^a : null and ^a :struct, _, _: 'R, _impl: Default1) = id #if !FABLE_COMPILER - static member Traverse (t: 't seq, f: 't->Async<'u>, []_output: Async>, []_impl: Traverse) : Async> = async { - #if TEST_TRACE - Traces.add "Traverse 't seq, 't->Async<'u>" - #endif - - let! ct = Async.CancellationToken - return seq { - use enum = t.GetEnumerator () - while enum.MoveNext() do - yield Async.RunSynchronously (f enum.Current, cancellationToken = ct) }} + static member Traverse (t: 't seq, f: 't -> Async<'u>, []_output: Async>, []_impl: Traverse) : Async> = async { + #if TEST_TRACE + Traces.add "Traverse 't seq, 't -> Async<'u>" + #endif + + let! ct = Async.CancellationToken + return seq { + use enum = t.GetEnumerator () + while enum.MoveNext() do + yield Async.RunSynchronously (f enum.Current, cancellationToken = ct) }} #endif #if !FABLE_COMPILER - static member Traverse (t: 't NonEmptySeq, f: 't->Async<'u>, []_output: Async>, []_impl: Traverse) : Async> = async { - #if TEST_TRACE - Traces.add "Traverse 't NonEmptySeq, 't->Async<'u>" - #endif - - let! ct = Async.CancellationToken - return seq { - use enum = t.GetEnumerator () - while enum.MoveNext() do - yield Async.RunSynchronously (f enum.Current, cancellationToken = ct) } |> NonEmptySeq.unsafeOfSeq } + static member Traverse (t: 't NonEmptySeq, f: 't -> Async<'u>, []_output: Async>, []_impl: Traverse) : Async> = async { + #if TEST_TRACE + Traces.add "Traverse 't NonEmptySeq, 't -> Async<'u>" + #endif + + let! ct = Async.CancellationToken + return seq { + use enum = t.GetEnumerator () + while enum.MoveNext() do + yield Async.RunSynchronously (f enum.Current, cancellationToken = ct) } |> NonEmptySeq.unsafeOfSeq } #endif - static member Traverse (t: Id<'t> , f: 't->option<'u>, []_output: option>, []_impl: Traverse) = - #if TEST_TRACE - Traces.add "Traverse Id, 't->option<'u>" - #endif - Option.map Id.create (f (Id.run t)) + static member Traverse (t: Id<'t>, f: 't -> option<'u>, []_output: option>, []_impl: Traverse) = + #if TEST_TRACE + Traces.add "Traverse Id, 't -> option<'u>" + #endif + Option.map Id.create (f (Id.run t)) + static member inline Traverse (t: option<_>, f, []_output: 'R, []_impl: Traverse) : 'R = - #if TEST_TRACE - Traces.add "Traverse option" - #endif - match t with Some x -> Map.Invoke Some (f x) | _ -> result None + #if TEST_TRACE + Traces.add "Traverse option" + #endif + match t with Some x -> Map.Invoke Some (f x) | _ -> result None + static member inline Traverse (t: voption<_>, f, []_output: 'R, []_impl: Traverse) : 'R = - #if TEST_TRACE - Traces.add "Traverse voption" - #endif - match t with ValueSome x -> Map.Invoke ValueSome (f x) | _ -> result ValueNone + #if TEST_TRACE + Traces.add "Traverse voption" + #endif + match t with ValueSome x -> Map.Invoke ValueSome (f x) | _ -> result ValueNone static member inline Traverse (t:Map<_,_> , f, []_output: 'R, []_impl: Traverse) : 'R = - #if TEST_TRACE - Traces.add "Traverse Map" - #endif - let insert_f m k v = Map.Invoke (Map.add k) v <*> m - Map.fold insert_f (result Map.empty) (Map.mapValues f t) - - static member inline Traverse (t: Result<'T,'Error>, f: 'T->'``Functor<'U>``, []_output: '``Functor>``, []_impl: Traverse) : '``Functor>`` = - #if TEST_TRACE - Traces.add "Traverse Result, 'T->Functor<'U>" - #endif - match t with - | Ok a -> Map.Invoke Result<'U,'Error>.Ok (f a) - | Error e -> Return.Invoke (Result<'U,'Error>.Error e) - - static member inline Traverse (t: Choice<'T,'Error>, f: 'T->'``Functor<'U>``, []_output: '``Functor>``, []_impl: Traverse) : '``Functor>`` = - #if TEST_TRACE - Traces.add "Traverse Choice, 'T->Functor<'U>" - #endif - match t with - | Choice1Of2 a -> Map.Invoke Choice<'U,'Error>.Choice1Of2 (f a) - | Choice2Of2 e -> Return.Invoke (Choice<'U,'Error>.Choice2Of2 e) - - static member inline Traverse (t:list<_> ,f , []_output: 'R, []_impl: Traverse) : 'R = - #if TEST_TRACE - Traces.add "Traverse list" - #endif - let rec loop acc = function - | [] -> acc - | x::xs -> - let v = f x - loop (v::acc) xs - let cons_f x xs = Map.Invoke List.cons xs <*> x - List.fold cons_f (result []) (loop [] t) - - static member inline Traverse (t:_ [] ,f , []_output: 'R, []_impl: Traverse) : 'R = - #if TEST_TRACE - Traces.add "Traverse []" - #endif - let cons x y = Array.append [|x|] y - let rec loop acc = function - | [||] -> acc - | xxs -> - let x, xs = Array.head xxs, Array.tail xxs - let v = f x - loop (cons v acc) xs - let cons_f x xs = Map.Invoke cons xs <*> x - Array.fold cons_f (result [||]) (loop [||] t) - - static member inline Invoke (f: 'T->'``Functor<'U>``) (t: '``Traversable<'T>``) : '``Functor<'Traversable<'U>>`` = + #if TEST_TRACE + Traces.add "Traverse Map" + #endif + let insert_f m k v = Map.Invoke (Map.add k) v <*> m + Map.fold insert_f (result Map.empty) (Map.mapValues f t) + + static member inline Traverse (t: Result<'T,'Error>, f: 'T -> '``Functor<'U>``, []_output: '``Functor>``, []_impl: Traverse) : '``Functor>`` = + #if TEST_TRACE + Traces.add "Traverse Result, 'T -> Functor<'U>" + #endif + match t with + | Ok a -> Map.Invoke Result<'U, 'Error>.Ok (f a) + | Error e -> Return.Invoke (Result<'U, 'Error>.Error e) + + static member inline Traverse (t: Choice<'T,'Error>, f: 'T -> '``Functor<'U>``, []_output: '``Functor>``, []_impl: Traverse) : '``Functor>`` = + #if TEST_TRACE + Traces.add "Traverse Choice, 'T -> Functor<'U>" + #endif + match t with + | Choice1Of2 a -> Map.Invoke Choice<'U,'Error>.Choice1Of2 (f a) + | Choice2Of2 e -> Return.Invoke (Choice<'U,'Error>.Choice2Of2 e) + + static member inline Traverse (t:list<_>,f , []_output: 'R, []_impl: Traverse) : 'R = + #if TEST_TRACE + Traces.add "Traverse list" + #endif + let rec loop acc = function + | [] -> acc + | x::xs -> + let v = f x + loop (v::acc) xs + let cons_f x xs = Map.Invoke List.cons xs <*> x + List.fold cons_f (result []) (loop [] t) + + static member inline Traverse (t:_ [],f , []_output: 'R, []_impl: Traverse) : 'R = + #if TEST_TRACE + Traces.add "Traverse []" + #endif + let cons x y = Array.append [|x|] y + let rec loop acc = function + | [||] -> acc + | xxs -> + let x, xs = Array.head xxs, Array.tail xxs + let v = f x + loop (cons v acc) xs + let cons_f x xs = Map.Invoke cons xs <*> x + Array.fold cons_f (result [||]) (loop [||] t) + + static member inline Invoke (f: 'T -> '``Functor<'U>``) (t: '``Traversable<'T>``) : '``Functor<'Traversable<'U>>`` = let inline call_3 (a: ^a, b: ^b, c: ^c, f) = ((^a or ^b or ^c) : (static member Traverse : _*_*_*_ -> _) b, f, c, a) let inline call (a: 'a, b: 'b, f) = call_3 (a, b, Unchecked.defaultof<'R>, f) : 'R call (Unchecked.defaultof, t, f) @@ -179,44 +180,46 @@ type Traverse = type Sequence with - static member inline Sequence (t:_ seq , []_output: 'R, []_impl:Default5) : 'R = - let cons x y = seq {yield x; yield! y} - let cons_f x ys = Map.Invoke (cons: 'a->seq<_>->seq<_>) x <*> ys - Seq.foldBack cons_f t (result Seq.empty) + static member inline Sequence (t: _ seq, []_output: 'R, []_impl: Default5) : 'R = + let cons x y = seq { yield x; yield! y } + let cons_f x ys = Map.Invoke (cons: 'a -> seq<_> -> seq<_>) x <*> ys + Seq.foldBack cons_f t (result Seq.empty) + + static member inline Sequence (t: seq<'``Applicative<'T>``>, []_output: '``Applicative>`` , []_impl: Default4) : '``Applicative>`` = + Sequence.ForInfiniteSequences (t, IsLeftZero.Invoke, List.toSeq) - static member inline Sequence (t: seq<'``Applicative<'T>``>, []_output: '``Applicative>`` , []_impl: Default4) = Sequence.ForInfiniteSequences (t, IsLeftZero.Invoke, List.toSeq) : '``Applicative>`` - static member Sequence (t: seq> , []_output: option> , []_impl: Default3) = Option.Sequence t : option> + static member Sequence (t: seq> , []_output: option> , []_impl: Default3) : option> = Option.Sequence t #if !FABLE_COMPILER - static member Sequence (t: seq> , []_output: voption> , []_impl: Default3) = ValueOption.Sequence t : voption> + static member Sequence (t: seq> , []_output: voption> , []_impl: Default3) : voption> = ValueOption.Sequence t #endif - static member Sequence (t: seq>, []_output: Result, 'e>, []_impl: Default3) = Result.Sequence t : Result, 'e> - static member Sequence (t: seq>, []_output: Choice, 'e>, []_impl: Default3) = Choice.Sequence t : Choice, 'e> - static member Sequence (t: seq> , []_output: list> , []_impl: Default3) = Sequence.ForInfiniteSequences(t, List.isEmpty, List.toSeq) : list> - static member Sequence (t: seq<'t []> , []_output: seq<'t> [] , []_impl: Default3) = Sequence.ForInfiniteSequences(t, Array.isEmpty, List.toSeq) : seq<'t> [] + static member Sequence (t: seq>, []_output: Result, 'e>, []_impl: Default3) : Result, 'e> = Result.Sequence t + static member Sequence (t: seq>, []_output: Choice, 'e>, []_impl: Default3) : Choice, 'e> = Choice.Sequence t + static member Sequence (t: seq> , []_output: list> , []_impl: Default3) : list> = Sequence.ForInfiniteSequences (t, List.isEmpty, List.toSeq) + static member Sequence (t: seq<'t []> , []_output: seq<'t> [] , []_impl: Default3) : seq<'t> [] = Sequence.ForInfiniteSequences (t, Array.isEmpty, List.toSeq) #if !FABLE_COMPILER - static member Sequence (t: seq> , []_output: Async> , []_impl: Default3) = Async.Sequence t : Async> + static member Sequence (t: seq> , []_output: Async> , []_impl: Default3) : Async> = Async.Sequence t #endif - static member inline Sequence (t: NonEmptySeq<'``Applicative<'T>``>, []_output: '``Applicative>`` , []_impl: Default4) = Sequence.ForInfiniteSequences (t, IsLeftZero.Invoke, NonEmptySeq.ofList) : '``Applicative>`` - static member Sequence (t: NonEmptySeq> , []_output: option> , []_impl: Default3) = Option.Sequence t |> Option.map NonEmptySeq.unsafeOfSeq : option> - static member Sequence (t: NonEmptySeq>, []_output: Result, 'e>, []_impl: Default3) = Result.Sequence t |> Result.map NonEmptySeq.unsafeOfSeq : Result, 'e> - static member Sequence (t: NonEmptySeq>, []_output: Choice, 'e>, []_impl: Default3) = Choice.Sequence t |> Choice.map NonEmptySeq.unsafeOfSeq : Choice, 'e> - static member Sequence (t: NonEmptySeq> , []_output: list> , []_impl: Default3) = Sequence.ForInfiniteSequences(t, List.isEmpty, NonEmptySeq.ofList) : list> - static member Sequence (t: NonEmptySeq<'t []> , []_output: NonEmptySeq<'t> [] , []_impl: Default3) = Sequence.ForInfiniteSequences(t, Array.isEmpty, NonEmptySeq.ofList) : NonEmptySeq<'t> [] + static member inline Sequence (t: NonEmptySeq<'``Applicative<'T>``>, []_output: '``Applicative>`` , []_impl: Default4) : '``Applicative>`` = Sequence.ForInfiniteSequences (t, IsLeftZero.Invoke, NonEmptySeq.ofList) + static member Sequence (t: NonEmptySeq> , []_output: option> , []_impl: Default3) : option> = Option.Sequence t |> Option.map NonEmptySeq.unsafeOfSeq + static member Sequence (t: NonEmptySeq>, []_output: Result, 'e>, []_impl: Default3) : Result, 'e> = Result.Sequence t |> Result.map NonEmptySeq.unsafeOfSeq + static member Sequence (t: NonEmptySeq>, []_output: Choice, 'e>, []_impl: Default3) : Choice, 'e> = Choice.Sequence t |> Choice.map NonEmptySeq.unsafeOfSeq + static member Sequence (t: NonEmptySeq> , []_output: list> , []_impl: Default3) : list> = Sequence.ForInfiniteSequences(t, List.isEmpty , NonEmptySeq.ofList) + static member Sequence (t: NonEmptySeq<'t []> , []_output: NonEmptySeq<'t> [] , []_impl: Default3) : NonEmptySeq<'t> [] = Sequence.ForInfiniteSequences(t, Array.isEmpty, NonEmptySeq.ofList) #if !FABLE_COMPILER static member Sequence (t: NonEmptySeq> , []_output: Async> , []_impl: Default3) = Async.Sequence t |> Async.map NonEmptySeq.unsafeOfSeq : Async> #endif - static member inline Sequence (t: ^a , []_output: 'R , []_impl: Default2) = Traverse.InvokeOnInstance id t : 'R - static member inline Sequence (t: ^a , []_output: 'R , []_impl: Default1) = Sequence.InvokeOnInstance t : 'R + static member inline Sequence (t: ^a , []_output: 'R, []_impl: Default2) : 'R = Traverse.InvokeOnInstance id t + static member inline Sequence (t: ^a , []_output: 'R, []_impl: Default1) : 'R = Sequence.InvokeOnInstance t - static member inline Sequence (t: option<_> , []_output: 'R , []_impl: Sequence) = match t with Some x -> Map.Invoke Some x | _ -> result None : 'R + static member inline Sequence (t: option<_> , []_output: 'R, []_impl: Sequence) : 'R = match t with Some x -> Map.Invoke Some x | _ -> result None #if !FABLE_COMPILER - static member inline Sequence (t: voption<_> , []_output: 'R , []_impl: Sequence) = match t with ValueSome x -> Map.Invoke ValueSome x | _ -> result ValueNone: 'R + static member inline Sequence (t: voption<_>, []_output: 'R, []_impl: Sequence) : 'R = match t with ValueSome x -> Map.Invoke ValueSome x | _ -> result ValueNone #endif - static member inline Sequence (t: list<_> , []_output: 'R , []_impl: Sequence) = Sequence.ForInfiniteSequences(t, IsLeftZero.Invoke, id) : 'R + static member inline Sequence (t: list<_> , []_output: 'R, []_impl: Sequence) : 'R = Sequence.ForInfiniteSequences(t, IsLeftZero.Invoke, id) - static member inline Sequence (t: Map<_,_> , []_output: 'R , []_impl: Sequence) : 'R = + static member inline Sequence (t: Map<_,_> , []_output: 'R, []_impl: Sequence) : 'R = let insert_f k x ys = Map.Invoke (Map.add k) x <*> ys Map.foldBack insert_f t (result Map.empty) @@ -230,11 +233,11 @@ type Sequence with | Choice1Of2 a -> Map.Invoke Choice<'T,'Error>.Choice1Of2 a | Choice2Of2 e -> Return.Invoke (Choice<'T,'Error>.Choice2Of2 e) - static member inline Sequence (t: _ [] , []_output: 'R , []_impl: Sequence) = Sequence.ForInfiniteSequences(t, IsLeftZero.Invoke, Array.ofList) : 'R + static member inline Sequence (t: _ [] , []_output: 'R , []_impl: Sequence) : 'R = Sequence.ForInfiniteSequences(t, IsLeftZero.Invoke, Array.ofList) - static member inline Sequence (t: Id<'``Functor<'T>``> , []_output: '``Functor>`` , []_impl: Sequence) = Traverse.Invoke id t : '``Functor>`` + static member inline Sequence (t: Id<'``Functor<'T>``> , []_output: '``Functor>`` , []_impl: Sequence) : '``Functor>`` = Traverse.Invoke id t - static member inline Sequence (t: ResizeArray<'``Functor<'T>``>, []_output: '``Functor>`` , []_impl: Sequence) = Traverse.Invoke id t : '``Functor>`` + static member inline Sequence (t: ResizeArray<'``Functor<'T>``>, []_output: '``Functor>`` , []_impl: Sequence) : '``Functor>``= Traverse.Invoke id t static member inline Invoke (t: '``Traversable<'Applicative<'T>>``) : '``Applicative<'Traversable<'T>>`` = let inline call_3 (a: ^a, b: ^b, c: ^c) = ((^a or ^b or ^c) : (static member Sequence : _*_*_ -> _) b, c, a) diff --git a/tests/FSharpPlus.Tests/Traversals.fs b/tests/FSharpPlus.Tests/Traversals.fs index 7cbf800bd..c45cdcec2 100644 --- a/tests/FSharpPlus.Tests/Traversals.fs +++ b/tests/FSharpPlus.Tests/Traversals.fs @@ -305,7 +305,7 @@ module Traversable = CollectionAssert.AreEqual (expected, a) CollectionAssert.AreEqual (expected, b) #if TEST_TRACE - CollectionAssert.AreEqual (["Traverse Result, 'T->Functor<'U>"], Traces.get()) + CollectionAssert.AreEqual (["Traverse Result, 'T -> Functor<'U>"], Traces.get()) #endif