11namespace FSharp.Compiler.UnitTests
22
33open NUnit.Framework
4- open FSharp.TestHelpers
4+ open FSharp.Test . Utilities
55open FSharp.Compiler .SourceCodeServices
66
77[<TestFixture>]
88module ComputationExpressionTests =
99
10- let ``complex CE with source member and applicatives`` ceUsage =
10+ let ``complex CE with source member and applicatives`` ceUsage =
1111 sprintf """
1212module Code
1313type ResultBuilder() =
@@ -22,15 +22,15 @@ type ResultBuilder() =
2222
2323let result = ResultBuilder()
2424
25- module Result =
26- let zip x1 x2 =
25+ module Result =
26+ let zip x1 x2 =
2727 match x1,x2 with
2828 | Ok x1res, Ok x2res -> Ok (x1res, x2res)
2929 | Error e, _ -> Error e
3030 | _, Error e -> Error e
3131
3232 let ofChoice c =
33- match c with
33+ match c with
3434 | Choice1Of2 x -> Ok x
3535 | Choice2Of2 x -> Error x
3636
@@ -49,7 +49,7 @@ module Async =
4949 return r1,r2
5050 }
5151
52- module AsyncResult =
52+ module AsyncResult =
5353 let zip x1 x2 =
5454 Async.zip x1 x2
5555 |> Async.map(fun (r1, r2) -> Result.zip r1 r2)
@@ -103,7 +103,7 @@ type AsyncResultBuilder() =
103103 compensation: unit -> unit)
104104 : Async<Result<'T, 'TError>> =
105105 async.TryFinally(computation, compensation)
106-
106+
107107 member __.Using
108108 (resource: 'T when 'T :> System.IDisposable,
109109 binder: 'T -> Async<Result<'U, 'TError>>)
@@ -124,9 +124,9 @@ type AsyncResultBuilder() =
124124 this.Delay(fun () -> binder enum.Current)))
125125
126126 member inline __.BindReturn(x: Async<Result<'T,'U>>, f) = async.Bind(x, fun r -> Result.map f r |> async.Return)
127- member inline __.MergeSources(t1: Async<Result<'T,'U>>, t2: Async<Result<'T1,'U>>) =
127+ member inline __.MergeSources(t1: Async<Result<'T,'U>>, t2: Async<Result<'T1,'U>>) =
128128 AsyncResult.zip t1 t2
129-
129+
130130 member inline _.Source(result : Async<Result<_,_>>) : Async<Result<_,_>> = result
131131
132132[<AutoOpen>]
@@ -145,10 +145,10 @@ module ARExts =
145145 /// <summary>
146146 /// Method lets us transform data types into our internal representation.
147147 /// </summary>
148- member inline _.Source(choice : Choice<_,_>) : Async<Result<_,_>> =
148+ member inline _.Source(choice : Choice<_,_>) : Async<Result<_,_>> =
149149 choice
150150 |> Result.ofChoice
151- |> Async.singleton
151+ |> Async.singleton
152152
153153 /// <summary>
154154 /// Method lets us transform data types into our internal representation.
@@ -174,7 +174,7 @@ asyncResult {
174174|> printfn "%d "
175175"""
176176 CompilerAssert.Pass code
177-
177+
178178 [<Test>]
179179 let ``match - bang should apply source transformations to its inputs`` () =
180180 let code = `` complex CE with source member and applicatives `` """
0 commit comments