From bc9cd6fc62d1d0b1c72611e0a394bfcae7820df6 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Fri, 17 Sep 2021 09:54:16 +0800 Subject: [PATCH] Tests: change generic notation (to not interfere with upcoming feat) --- src/Fantomas.Tests/AttributeTests.fs | 4 +- ...eforeDiscriminatedUnionDeclarationTests.fs | 8 +-- ...nkLinesAroundNestedMultilineExpressions.fs | 12 ++-- src/Fantomas.Tests/ClassTests.fs | 24 +++---- src/Fantomas.Tests/CommentTests.fs | 16 ++--- src/Fantomas.Tests/CompilerDirectivesTests.fs | 16 ++--- .../ComputationExpressionTests.fs | 32 ++++----- src/Fantomas.Tests/DotGetTests.fs | 4 +- src/Fantomas.Tests/ElmishTests.fs | 4 +- src/Fantomas.Tests/FunctionDefinitionTests.fs | 46 ++++++------ src/Fantomas.Tests/IfThenElseTests.fs | 8 +-- src/Fantomas.Tests/KeepIndentInBranchTests.fs | 8 +-- src/Fantomas.Tests/LetBindingTests.fs | 20 +++--- src/Fantomas.Tests/ListTests.fs | 32 ++++----- src/Fantomas.Tests/ModuleTests.fs | 24 +++---- .../MultiLineLambdaClosingNewlineTests.fs | 8 +-- ...ineBlockBracketsOnSameColumnRecordTests.fs | 16 ++--- ...ineBetweenTypeDefinitionAndMembersTests.fs | 4 +- .../NumberOfItemsRecordTests.fs | 12 ++-- src/Fantomas.Tests/PatternMatchingTests.fs | 4 +- src/Fantomas.Tests/RecordTests.fs | 12 ++-- src/Fantomas.Tests/SignatureTests.fs | 72 +++++++++---------- src/Fantomas.Tests/SpecialConstructsTests.fs | 4 +- src/Fantomas.Tests/TriviaTests.fs | 2 +- src/Fantomas.Tests/TypeDeclarationTests.fs | 72 +++++++++---------- src/Fantomas.Tests/UnionTests.fs | 52 +++++++------- src/Fantomas.Tests/UtilsTests.fs | 6 +- 27 files changed, 261 insertions(+), 261 deletions(-) diff --git a/src/Fantomas.Tests/AttributeTests.fs b/src/Fantomas.Tests/AttributeTests.fs index 5cbc9356c3..6e4de5767a 100644 --- a/src/Fantomas.Tests/AttributeTests.fs +++ b/src/Fantomas.Tests/AttributeTests.fs @@ -654,7 +654,7 @@ type RoleAdminImportController(akkaService: AkkaService) = [, 200); + ProducesResponseType(typeof>, 200); ProducesResponseType(404); Authorize(AuthorizationScopePolicies.Write)>] member _.StartJob(file: IFormFile, [] args: ImporterJobArgs) = @@ -701,7 +701,7 @@ type RoleAdminImportController(akkaService: AkkaService) = [, 200); + ProducesResponseType(typeof>, 200); ProducesResponseType(404); Authorize(AuthorizationScopePolicies.Write)>] member _.StartJob(file: IFormFile, [] args: ImporterJobArgs) = diff --git a/src/Fantomas.Tests/BarBeforeDiscriminatedUnionDeclarationTests.fs b/src/Fantomas.Tests/BarBeforeDiscriminatedUnionDeclarationTests.fs index da8b48a67a..bd375d2967 100644 --- a/src/Fantomas.Tests/BarBeforeDiscriminatedUnionDeclarationTests.fs +++ b/src/Fantomas.Tests/BarBeforeDiscriminatedUnionDeclarationTests.fs @@ -63,7 +63,7 @@ let ``multiline DU case`` () = [] type SynBinding = SynBinding of - accessibility: SynAccess option * + accessibility: option * kind: SynBindingKind * mustInline: bool * isMutable: bool * @@ -71,7 +71,7 @@ type SynBinding = xmlDoc: PreXmlDoc * valData: SynValData * headPat: SynPat * - returnInfo: SynBindingReturnInfo option * + returnInfo: option * expr: SynExpr * range: range * seqPoint: DebugPointAtBinding @@ -84,7 +84,7 @@ type SynBinding = [] type SynBinding = | SynBinding of - accessibility: SynAccess option * + accessibility: option * kind: SynBindingKind * mustInline: bool * isMutable: bool * @@ -92,7 +92,7 @@ type SynBinding = xmlDoc: PreXmlDoc * valData: SynValData * headPat: SynPat * - returnInfo: SynBindingReturnInfo option * + returnInfo: option * expr: SynExpr * range: range * seqPoint: DebugPointAtBinding diff --git a/src/Fantomas.Tests/BlankLinesAroundNestedMultilineExpressions.fs b/src/Fantomas.Tests/BlankLinesAroundNestedMultilineExpressions.fs index 9b2f3f628a..2ac66b5008 100644 --- a/src/Fantomas.Tests/BlankLinesAroundNestedMultilineExpressions.fs +++ b/src/Fantomas.Tests/BlankLinesAroundNestedMultilineExpressions.fs @@ -250,7 +250,7 @@ let ``recursive types`` () = formatSourceString false """ -type Cmd<'msg> = Cmd'<'msg> list +type Cmd<'msg> = list> and private Cmd'<'msg> = Send<'msg> -> unit """ config @@ -258,7 +258,7 @@ and private Cmd'<'msg> = Send<'msg> -> unit |> should equal """ -type Cmd<'msg> = Cmd'<'msg> list +type Cmd<'msg> = list> and private Cmd'<'msg> = Send<'msg> -> unit """ @@ -268,7 +268,7 @@ let ``multiline recursive types`` () = false """ type ViewBinding<'model,'msg> = string * Variable<'model,'msg> -and ViewBindings<'model,'msg> = ViewBinding<'model,'msg> list +and ViewBindings<'model,'msg> = list> and Variable<'model,'msg> = | Bind of Getter<'model> | BindTwoWay of Getter<'model> * Setter<'model,'msg> @@ -283,7 +283,7 @@ and Variable<'model,'msg> = equal """ type ViewBinding<'model, 'msg> = string * Variable<'model, 'msg> -and ViewBindings<'model, 'msg> = ViewBinding<'model, 'msg> list +and ViewBindings<'model, 'msg> = list> and Variable<'model, 'msg> = | Bind of Getter<'model> | BindTwoWay of Getter<'model> * Setter<'model, 'msg> @@ -300,7 +300,7 @@ let ``recursive types in signature file`` () = """ namespace Foobar -type Cmd<'msg> = Cmd'<'msg> list +type Cmd<'msg> = list> and private Cmd'<'msg> = Send<'msg> -> unit """ config @@ -310,6 +310,6 @@ and private Cmd'<'msg> = Send<'msg> -> unit """ namespace Foobar -type Cmd<'msg> = Cmd'<'msg> list +type Cmd<'msg> = list> and private Cmd'<'msg> = Send<'msg> -> unit """ diff --git a/src/Fantomas.Tests/ClassTests.fs b/src/Fantomas.Tests/ClassTests.fs index 150e63f4c1..168fff86b3 100644 --- a/src/Fantomas.Tests/ClassTests.fs +++ b/src/Fantomas.Tests/ClassTests.fs @@ -251,7 +251,7 @@ let ``recursive classes`` () = """ type Folder(pathIn: string) = let path = pathIn - let filenameArray : string array = System.IO.Directory.GetFiles(path) + let filenameArray : array = System.IO.Directory.GetFiles(path) member this.FileArray = Array.map (fun elem -> new File(elem, this)) filenameArray and File(filename: string, containingFolder: Folder) = @@ -265,7 +265,7 @@ and File(filename: string, containingFolder: Folder) = """ type Folder(pathIn: string) = let path = pathIn - let filenameArray: string array = System.IO.Directory.GetFiles(path) + let filenameArray: array = System.IO.Directory.GetFiles(path) member this.FileArray = Array.map (fun elem -> new File(elem, this)) filenameArray and File(filename: string, containingFolder: Folder) = @@ -348,20 +348,20 @@ let ``should keep parens in class inheritance in the right place`` () = let ``should keep type annotations on auto properties`` () = formatSourceString false - """type Document(id : string, library : string, name : string option) = + """type Document(id : string, library : string, name : option) = member val ID = id member val Library = library member val Name = name with get, set - member val LibraryID : string option = None with get, set + member val LibraryID : option = None with get, set """ config |> should equal - """type Document(id: string, library: string, name: string option) = + """type Document(id: string, library: string, name: option) = member val ID = id member val Library = library member val Name = name with get, set - member val LibraryID: string option = None with get, set + member val LibraryID: option = None with get, set """ [] @@ -843,7 +843,7 @@ let ``comment before multiline class member`` () = type MaybeBuilder () = member inline __.Bind // meh - (value, binder : 'T -> 'U option) : 'U option = + (value, binder : 'T -> option<'U>) : option<'U> = Option.bind binder value """ config @@ -856,8 +856,8 @@ type MaybeBuilder() = // meh ( value, - binder: 'T -> 'U option - ) : 'U option = + binder: 'T -> option<'U> + ) : option<'U> = Option.bind binder value """ @@ -874,7 +874,7 @@ type MaybeBuilder () = #else member inline __.Bind #endif - (value, binder : 'T -> 'U option) : 'U option = + (value, binder : 'T -> option<'U>) : option<'U> = Option.bind binder value """ config @@ -892,8 +892,8 @@ type MaybeBuilder() = #endif ( value, - binder: 'T -> 'U option - ) : 'U option = + binder: 'T -> option<'U> + ) : option<'U> = Option.bind binder value """ diff --git a/src/Fantomas.Tests/CommentTests.fs b/src/Fantomas.Tests/CommentTests.fs index 6adcdf6954..a3922c2f79 100644 --- a/src/Fantomas.Tests/CommentTests.fs +++ b/src/Fantomas.Tests/CommentTests.fs @@ -40,7 +40,7 @@ let ``comments on local let bindings`` () = let print_30_permut() = /// declare and initialize - let permutation : int array = Array.init n (fun i -> Console.Write(i+1); i) + let permutation : array = Array.init n (fun i -> Console.Write(i+1); i) permutation """ config @@ -51,7 +51,7 @@ let print_30_permut() = let print_30_permut () = /// declare and initialize - let permutation: int array = + let permutation: array = Array.init n (fun i -> @@ -69,7 +69,7 @@ let ``comments on local let bindings with desugared lambda`` () = let print_30_permut() = /// declare and initialize - let permutation : int array = Array.init n (fun (i,j) -> Console.Write(i+1); i) + let permutation : array = Array.init n (fun (i,j) -> Console.Write(i+1); i) permutation """ config @@ -80,7 +80,7 @@ let print_30_permut() = let print_30_permut () = /// declare and initialize - let permutation: int array = + let permutation: array = Array.init n (fun (i, j) -> @@ -344,7 +344,7 @@ type IlxGenOptions = workAroundReflectionEmitBugs: bool emitConstantArraysUsingStaticDataBlobs: bool // If this is set, then the last module becomes the "main" module and its toplevel bindings are executed at startup - mainMethodInfo: Tast.Attribs option + mainMethodInfo: option localOptimizationsAreOn: bool generateDebugSymbols: bool testFlagEmitFeeFeeAs100001: bool @@ -374,7 +374,7 @@ type IlxGenOptions = workAroundReflectionEmitBugs: bool; emitConstantArraysUsingStaticDataBlobs: bool; // If this is set, then the last module becomes the "main" module and its toplevel bindings are executed at startup - mainMethodInfo: Tast.Attribs option; + mainMethodInfo: option; localOptimizationsAreOn: bool; generateDebugSymbols: bool; testFlagEmitFeeFeeAs100001: bool; @@ -1023,7 +1023,7 @@ let ``multiple line comments form a single trivia`` () = /// more freedom about typechecking these expressions. /// LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) type LongIdentWithDots = - | LongIdentWithDots of id: LongIdent * dotms: range list + | LongIdentWithDots of id: LongIdent * dotms: list """ config |> prepend newline @@ -1037,7 +1037,7 @@ type LongIdentWithDots = /// if dotms.Length = lid.Length, then the parser must have reported an error, so the typechecker is allowed /// more freedom about typechecking these expressions. /// LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) -type LongIdentWithDots = LongIdentWithDots of id: LongIdent * dotms: range list +type LongIdentWithDots = LongIdentWithDots of id: LongIdent * dotms: list """ [] diff --git a/src/Fantomas.Tests/CompilerDirectivesTests.fs b/src/Fantomas.Tests/CompilerDirectivesTests.fs index f4348c85ae..3f02c74b78 100644 --- a/src/Fantomas.Tests/CompilerDirectivesTests.fs +++ b/src/Fantomas.Tests/CompilerDirectivesTests.fs @@ -474,7 +474,7 @@ let ``some spacing is still lost in and around #if blocks, 303`` () = formatSourceString false """ - let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : StrongNameKeyPair option) = + let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : option) = let assemblyName = assembly.Name #if NETCOREAPP2_0 do @@ -498,7 +498,7 @@ let ``some spacing is still lost in and around #if blocks, 303`` () = |> should equal """ -let internal UpdateStrongNaming (assembly: AssemblyDefinition) (key: StrongNameKeyPair option) = +let internal UpdateStrongNaming (assembly: AssemblyDefinition) (key: option) = let assemblyName = assembly.Name #if NETCOREAPP2_0 do @@ -523,7 +523,7 @@ let ``some spacing is still lost in and around #if blocks, no defines`` () = formatSourceStringWithDefines [] """ - let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : StrongNameKeyPair option) = + let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : option) = let assemblyName = assembly.Name #if NETCOREAPP2_0 do @@ -547,7 +547,7 @@ let ``some spacing is still lost in and around #if blocks, no defines`` () = |> should equal """ -let internal UpdateStrongNaming (assembly: AssemblyDefinition) (key: StrongNameKeyPair option) = +let internal UpdateStrongNaming (assembly: AssemblyDefinition) (key: option) = let assemblyName = assembly.Name #if NETCOREAPP2_0 @@ -572,7 +572,7 @@ let ``some spacing is still lost in and around #if blocks, NETCOREAPP2_0`` () = formatSourceStringWithDefines [ "NETCOREAPP2_0" ] """ - let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : StrongNameKeyPair option) = + let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : option) = let assemblyName = assembly.Name #if NETCOREAPP2_0 do @@ -596,7 +596,7 @@ let ``some spacing is still lost in and around #if blocks, NETCOREAPP2_0`` () = |> should equal """ -let internal UpdateStrongNaming (assembly: AssemblyDefinition) (key: StrongNameKeyPair option) = +let internal UpdateStrongNaming (assembly: AssemblyDefinition) (key: option) = let assemblyName = assembly.Name #if NETCOREAPP2_0 do @@ -2311,7 +2311,7 @@ let ``directive above SynExpr.Do, 1333`` () = module ReactHookExtensions = type React with [] - static member useDeferred(operation: Async<'T>, dependencies: obj array) = + static member useDeferred(operation: Async<'T>, dependencies: array) = let (deferred, setDeferred) = React.useState(Deferred.HasNotStartedYet) let token = React.useCancellationToken() let executeOperation = async { @@ -2339,7 +2339,7 @@ module ReactHookExtensions = module ReactHookExtensions = type React with [] - static member useDeferred(operation: Async<'T>, dependencies: obj array) = + static member useDeferred(operation: Async<'T>, dependencies: array) = let (deferred, setDeferred) = React.useState (Deferred.HasNotStartedYet) diff --git a/src/Fantomas.Tests/ComputationExpressionTests.fs b/src/Fantomas.Tests/ComputationExpressionTests.fs index 038a587930..3c30d0e3a6 100644 --- a/src/Fantomas.Tests/ComputationExpressionTests.fs +++ b/src/Fantomas.Tests/ComputationExpressionTests.fs @@ -942,7 +942,7 @@ let rec runPendingJobs () = let ``let + let + let bang + if/then/else in ce`` () = formatSourceString false - """let rec private appendToAzureTableStorage (cosmoEvents: EventWrite seq) = + """let rec private appendToAzureTableStorage (cosmoEvents: seq>) = task { let moreThanBatchLimit = Seq.length cosmoEvents > BatchLimit @@ -965,7 +965,7 @@ let ``let + let + let bang + if/then/else in ce`` () = |> should equal """ -let rec private appendToAzureTableStorage (cosmoEvents: EventWrite seq) = +let rec private appendToAzureTableStorage (cosmoEvents: seq>) = task { let moreThanBatchLimit = Seq.length cosmoEvents > BatchLimit @@ -987,7 +987,7 @@ let rec private appendToAzureTableStorage (cosmoEvents: EventWrite se let ``short do bang in ce`` () = formatSourceString false - """let appendEvents userId (events: Event list) = + """let appendEvents userId (events: list) = let cosmoEvents = List.map (createEvent userId) events task { do! appendToAzureTableStorage cosmoEvents } """ @@ -996,7 +996,7 @@ let ``short do bang in ce`` () = |> should equal """ -let appendEvents userId (events: Event list) = +let appendEvents userId (events: list) = let cosmoEvents = List.map (createEvent userId) events task { do! appendToAzureTableStorage cosmoEvents } """ @@ -2053,13 +2053,13 @@ let ``overloads of custom keywords in computation expressions`` () = open System type InputKind = - | Text of placeholder:string option - | Password of placeholder: string option + | Text of placeholder:option + | Password of placeholder: option type InputOptions = - { Label: string option + { Label: option Kind : InputKind - Validators : (string -> bool) array } + Validators : array<(string -> bool)> } type InputBuilder() = member t.Yield(_) = @@ -2120,13 +2120,13 @@ let password = open System type InputKind = - | Text of placeholder: string option - | Password of placeholder: string option + | Text of placeholder: option + | Password of placeholder: option type InputOptions = - { Label: string option + { Label: option Kind: InputKind - Validators: (string -> bool) array } + Validators: array<(string -> bool)> } type InputBuilder() = member t.Yield(_) = @@ -2176,7 +2176,7 @@ let ``multiline do bang`` () = false """ type ProjectController(checker: FSharpChecker) = - member x.LoadWorkspace (files: string list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = + member x.LoadWorkspace (files: list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = async { match Environment.workspaceLoadDelay () with | delay when delay > TimeSpan.Zero -> @@ -2196,7 +2196,7 @@ type ProjectController(checker: FSharpChecker) = equal """ type ProjectController(checker: FSharpChecker) = - member x.LoadWorkspace (files: string list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = + member x.LoadWorkspace (files: list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = async { match Environment.workspaceLoadDelay () with | delay when delay > TimeSpan.Zero -> @@ -2217,7 +2217,7 @@ let ``multiline do`` () = false """ type ProjectController(checker: FSharpChecker) = - member x.LoadWorkspace (files: string list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = + member x.LoadWorkspace (files: list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = async { match Environment.workspaceLoadDelay () with | delay when delay > TimeSpan.Zero -> @@ -2234,7 +2234,7 @@ type ProjectController(checker: FSharpChecker) = equal """ type ProjectController(checker: FSharpChecker) = - member x.LoadWorkspace (files: string list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = + member x.LoadWorkspace (files: list) (tfmForScripts: FSIRefs.TFM) onProjectLoaded (generateBinlog: bool) = async { match Environment.workspaceLoadDelay () with | delay when delay > TimeSpan.Zero -> diff --git a/src/Fantomas.Tests/DotGetTests.fs b/src/Fantomas.Tests/DotGetTests.fs index 451db87a40..2057776a1a 100644 --- a/src/Fantomas.Tests/DotGetTests.fs +++ b/src/Fantomas.Tests/DotGetTests.fs @@ -123,7 +123,7 @@ module Services = member __.Resolve ( codec: FsCodec.IEventCodec<'event, byte [], _>, - fold: ('state -> 'event seq -> 'state), + fold: ('state -> seq<'event> -> 'state), initial: 'state, snapshot: (('event -> bool) * ('state -> 'event)) ) @@ -151,7 +151,7 @@ module Services = member __.Resolve ( codec: FsCodec.IEventCodec<'event, byte [], _>, - fold: ('state -> 'event seq -> 'state), + fold: ('state -> seq<'event> -> 'state), initial: 'state, snapshot: (('event -> bool) * ('state -> 'event)) ) = diff --git a/src/Fantomas.Tests/ElmishTests.fs b/src/Fantomas.Tests/ElmishTests.fs index 7b9ba3a112..adfa4cb62f 100644 --- a/src/Fantomas.Tests/ElmishTests.fs +++ b/src/Fantomas.Tests/ElmishTests.fs @@ -958,7 +958,7 @@ let ``react hook`` () = let private useLocationDetail (auth0 : Auth0Hook) (roles : RolesHook) id = let id = Guid.Parse(id) let eventCtx = React.useContext (eventContext) - let (creatorName, setCreatorName) = React.useState (None) + let (creatorName, setCreatorName) = React.useState> (None) let location = React.useMemo ((fun () -> getLocation eventCtx.Events id), [| eventCtx.Events; id |]) @@ -997,7 +997,7 @@ let private useLocationDetail (auth0 : Auth0Hook) (roles : RolesHook) id = let private useLocationDetail (auth0 : Auth0Hook) (roles : RolesHook) id = let id = Guid.Parse(id) let eventCtx = React.useContext (eventContext) - let (creatorName, setCreatorName) = React.useState (None) + let (creatorName, setCreatorName) = React.useState> (None) let location = React.useMemo ((fun () -> getLocation eventCtx.Events id), [| eventCtx.Events; id |]) diff --git a/src/Fantomas.Tests/FunctionDefinitionTests.fs b/src/Fantomas.Tests/FunctionDefinitionTests.fs index a2e590df65..72e81ecdc6 100644 --- a/src/Fantomas.Tests/FunctionDefinitionTests.fs +++ b/src/Fantomas.Tests/FunctionDefinitionTests.fs @@ -509,7 +509,7 @@ let ``respect page-width setting in function signature, 495`` () = formatSourceString false """ -let fold (funcs : ResultFunc<'Input, 'Output, 'TError> seq) (input : 'Input) : Result<'Output list, 'TError list> = +let fold (funcs : seq>) (input : 'Input) : Result, list<'TError>> = let mutable anyErrors = false let mutable collectedOutputs = [] let mutable collectedErrors = [] @@ -535,9 +535,9 @@ let fold (funcs : ResultFunc<'Input, 'Output, 'TError> seq) (input : 'Input) : R equal """ let fold - (funcs : ResultFunc<'Input, 'Output, 'TError> seq) + (funcs : seq>) (input : 'Input) - : Result<'Output list, 'TError list> = + : Result, list<'TError>> = let mutable anyErrors = false let mutable collectedOutputs = [] let mutable collectedErrors = [] @@ -580,10 +580,10 @@ let ``internal keyword included in function signature length check`` () = formatSourceString false """ - let internal UpdateStrongNaming (assembly : AssemblyDefinition) (key : StrongNameKeyPair option) = + let internal UpdateStrongName01 (assembly : AssemblyDefinition) (key : option) = assembly.Name - let UpdateStrongNamingX (assembly : AssemblyDefinition) (key : StrongNameKeyPair option) = + let UpdateStrongName02 (assembly : AssemblyDefinition) (key : option) = assembly.Name """ { config with @@ -593,13 +593,13 @@ let ``internal keyword included in function signature length check`` () = |> should equal """ -let internal UpdateStrongNaming +let internal UpdateStrongName01 (assembly : AssemblyDefinition) - (key : StrongNameKeyPair option) + (key : option) = assembly.Name -let UpdateStrongNamingX (assembly : AssemblyDefinition) (key : StrongNameKeyPair option) = +let UpdateStrongName02 (assembly : AssemblyDefinition) (key : option) = assembly.Name """ @@ -728,7 +728,7 @@ let private addTaskToScheduler let ``long function signature should align with equal sign, 883`` () = formatSourceString false - """let readModel (updateState : 'State -> EventEnvelope<'Event> list -> 'State) (initState : 'State) : ReadModel<'Event, 'State> = + """let readModel (updateState : 'State -> list> -> 'State) (initState : 'State) : ReadModel<'Event, 'State> = () """ { config with @@ -739,7 +739,7 @@ let ``long function signature should align with equal sign, 883`` () = equal """ let readModel - (updateState : 'State -> EventEnvelope<'Event> list -> 'State) + (updateState : 'State -> list> -> 'State) (initState : 'State) : ReadModel<'Event, 'State> = () @@ -749,7 +749,7 @@ let readModel let ``long function signature should align with equal sign, no return type`` () = formatSourceString false - """let readModel (updateState : 'State -> EventEnvelope<'Event> list -> 'State) (initState : 'State) = + """let readModel (updateState : 'State -> list> -> 'State) (initState : 'State) = () """ { config with @@ -761,7 +761,7 @@ let ``long function signature should align with equal sign, no return type`` () equal """ let readModel - (updateState : 'State -> EventEnvelope<'Event> list -> 'State) + (updateState : 'State -> list> -> 'State) (initState : 'State) = () @@ -772,7 +772,7 @@ let ``long function signature with single tuple parameter and no return type`` ( formatSourceString false """ -let fold (funcs: ResultFunc<'Input, 'Output, 'TError> seq, input: 'Input, input2: 'Input, input3: 'Input) = +let fold (funcs: seq>, input: 'Input, input2: 'Input, input3: 'Input) = () """ { config with MaxLineLength = 90 } @@ -782,7 +782,7 @@ let fold (funcs: ResultFunc<'Input, 'Output, 'TError> seq, input: 'Input, input2 """ let fold ( - funcs: ResultFunc<'Input, 'Output, 'TError> seq, + funcs: seq>, input: 'Input, input2: 'Input, input3: 'Input @@ -795,7 +795,7 @@ let ``long function signature with single tuple parameter and return type`` () = formatSourceString false """ -let fold (funcs: ResultFunc<'Input, 'Output, 'TError> seq, input: 'Input, input2: 'Input, input3: 'Input) : Result<'Output list, 'TError list> = +let fold (funcs: seq>, input: 'Input, input2: 'Input, input3: 'Input) : Result, list<'TError>> = () """ { config with MaxLineLength = 90 } @@ -805,11 +805,11 @@ let fold (funcs: ResultFunc<'Input, 'Output, 'TError> seq, input: 'Input, input2 """ let fold ( - funcs: ResultFunc<'Input, 'Output, 'TError> seq, + funcs: seq>, input: 'Input, input2: 'Input, input3: 'Input - ) : Result<'Output list, 'TError list> = + ) : Result, list<'TError>> = () """ @@ -818,7 +818,7 @@ let ``align long function signature to indentation without return type `` () = formatSourceString false """ -let fold (funcs: ResultFunc<'Input, 'Output, 'TError> seq) (input: 'Input) (input2: 'Input) (input3: 'Input) = () +let fold (funcs: seq>) (input: 'Input) (input2: 'Input) (input3: 'Input) = () """ { config with MaxLineLength = 60 @@ -828,7 +828,7 @@ let fold (funcs: ResultFunc<'Input, 'Output, 'TError> seq) (input: 'Input) (inpu equal """ let fold - (funcs: ResultFunc<'Input, 'Output, 'TError> seq) + (funcs: seq>) (input: 'Input) (input2: 'Input) (input3: 'Input) @@ -840,7 +840,7 @@ let fold let ``align long function signature to indentation with return type`` () = formatSourceString false - """let readModel (updateState : 'State -> EventEnvelope<'Event> list -> 'State) (initState : 'State) : ReadModel<'Event, 'State> = + """let readModel (updateState : 'State -> list> -> 'State) (initState : 'State) : ReadModel<'Event, 'State> = () """ { config with @@ -852,7 +852,7 @@ let ``align long function signature to indentation with return type`` () = equal """ let readModel - (updateState : 'State -> EventEnvelope<'Event> list -> 'State) + (updateState : 'State -> list> -> 'State) (initState : 'State) : ReadModel<'Event, 'State> = @@ -1385,12 +1385,12 @@ let ``function argument with parenthesis, 1470`` () = formatSourceString false """ -let bazka (f: ((FooTypeX -> string * string list)) Bar) = failwith "" +let bazka (f: Bar<((FooTypeX -> string * list))>) = failwith "" """ config |> prepend newline |> should equal """ -let bazka (f: ((FooTypeX -> string * string list)) Bar) = failwith "" +let bazka (f: Bar<((FooTypeX -> string * list))>) = failwith "" """ diff --git a/src/Fantomas.Tests/IfThenElseTests.fs b/src/Fantomas.Tests/IfThenElseTests.fs index 9d80d5f75e..952cad3536 100644 --- a/src/Fantomas.Tests/IfThenElseTests.fs +++ b/src/Fantomas.Tests/IfThenElseTests.fs @@ -2177,7 +2177,7 @@ let ``comment after then of else if, 1606`` () = false """ type internal Foo private () = - static member Bar : int option = + static member Bar : option = if thing = 1 then printfn "hi" else if @@ -2187,7 +2187,7 @@ type internal Foo private () = else failwith "" type internal Foo2 private () = - static member Bar : int option = + static member Bar : option = if thing = 1 then printfn "hi" else if veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong @@ -2203,7 +2203,7 @@ type internal Foo2 private () = equal """ type internal Foo private () = - static member Bar: int option = + static member Bar: option = if thing = 1 then printfn "hi" else if veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong @@ -2214,7 +2214,7 @@ type internal Foo private () = failwith "" type internal Foo2 private () = - static member Bar: int option = + static member Bar: option = if thing = 1 then printfn "hi" else if veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong diff --git a/src/Fantomas.Tests/KeepIndentInBranchTests.fs b/src/Fantomas.Tests/KeepIndentInBranchTests.fs index deff49ea3f..35c1d24800 100644 --- a/src/Fantomas.Tests/KeepIndentInBranchTests.fs +++ b/src/Fantomas.Tests/KeepIndentInBranchTests.fs @@ -313,7 +313,7 @@ let ``match is return value of SynBinding with return type`` () = module Foo = let make () = { new IBar with - member __.DoIt (i : int) : int option = + member __.DoIt (i : int) : option = doSomeStuff () match i with | 0 -> @@ -340,7 +340,7 @@ module Foo = module Foo = let make () = { new IBar with - member __.DoIt(i: int) : int option = + member __.DoIt(i: int) : option = doSomeStuff () match i with @@ -1778,7 +1778,7 @@ let ``short function application in if branch`` () = formatSourceString false """ -let private parseModel (modelSrc: string) : Result = +let private parseModel (modelSrc: string) : Result> = if not (File.Exists(modelSrc)) then Error [ sprintf "Provided modelSrc \"%s\" does not exist" modelSrc ] else @@ -1807,7 +1807,7 @@ let private parseModel (modelSrc: string) : Result = |> should equal """ -let private parseModel (modelSrc: string) : Result = +let private parseModel (modelSrc: string) : Result> = if not (File.Exists(modelSrc)) then Error [ sprintf "Provided modelSrc \"%s\" does not exist" modelSrc ] else diff --git a/src/Fantomas.Tests/LetBindingTests.fs b/src/Fantomas.Tests/LetBindingTests.fs index da53e1ef79..8ae2112e84 100644 --- a/src/Fantomas.Tests/LetBindingTests.fs +++ b/src/Fantomas.Tests/LetBindingTests.fs @@ -195,9 +195,9 @@ module Card = | Outline of bool | Color of Common.Color | Body of bool - | Custom of IHTMLProp list + | Custom of list - let card (props: CardProps seq) (elems: ReactElement seq): ReactElement = + let card (props: seq) (elems: seq): ReactElement = let customProps = props |> Seq.collect (function @@ -232,9 +232,9 @@ module Card = | Outline of bool | Color of Common.Color | Body of bool - | Custom of IHTMLProp list + | Custom of list - let card (props: CardProps seq) (elems: ReactElement seq) : ReactElement = + let card (props: seq) (elems: seq) : ReactElement = let customProps = props |> Seq.collect @@ -473,7 +473,7 @@ let ``has symbol in signature requires paren, 564`` () = formatSourceString false """module Bar = - let foo (_ : #(int seq)) = 1 + let foo (_ : #(seq)) = 1 let meh (_: #seq) = 2 let evenMoreMeh (_: #seq) : int = 2 """ @@ -487,7 +487,7 @@ let ``has symbol in signature requires paren, 564`` () = equal """ module Bar = - let foo(_: #(int seq)) = 1 + let foo(_: #(seq)) = 1 let meh(_: #seq) = 2 let evenMoreMeh(_: #seq) : int = 2 """ @@ -762,7 +762,7 @@ let useEntries month year = let filter = Projections.isInMonth month year - let sortMapAndToArray (input: Transaction seq) = + let sortMapAndToArray (input: seq) = input |> Seq.sortBy (fun ai -> ai.Created) |> Seq.map (fun ai -> @@ -801,7 +801,7 @@ let useEntries month year = let filter = Projections.isInMonth month year - let sortMapAndToArray (input: Transaction seq) = + let sortMapAndToArray (input: seq) = input |> Seq.sortBy (fun ai -> ai.Created) |> Seq.map @@ -1757,7 +1757,7 @@ let useGeolocation : unit -> {| latitude: float longitude: float loading: bool - error: obj option |} = + error: option |} = import "useGeolocation" "react-use" type Viewport = @@ -1776,7 +1776,7 @@ let useGeolocation: unit -> {| latitude: float longitude: float loading: bool - error: obj option |} = + error: option |} = import "useGeolocation" "react-use" type Viewport = diff --git a/src/Fantomas.Tests/ListTests.fs b/src/Fantomas.Tests/ListTests.fs index bef627f81b..a43dbf9e24 100644 --- a/src/Fantomas.Tests/ListTests.fs +++ b/src/Fantomas.Tests/ListTests.fs @@ -1572,7 +1572,7 @@ let ``comment after [ should be preserved, 551`` () = formatSourceString false """ -let nestedList: obj list = [ +let nestedList: list = [ "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1588,7 +1588,7 @@ let nestedList: obj list = [ |> should equal """ -let nestedList: obj list = +let nestedList: list = [ "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1604,7 +1604,7 @@ let ``comment after [| should be preserved, 551`` () = formatSourceString false """ -let nestedList: obj list = [| +let nestedList: list = [| "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1620,7 +1620,7 @@ let nestedList: obj list = [| |> should equal """ -let nestedList: obj list = +let nestedList: list = [| "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1635,7 +1635,7 @@ let ``comment after |] should be preserved, 551`` () = formatSourceString false """ -let nestedList: obj list = [| +let nestedList: list = [| "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1651,7 +1651,7 @@ let nestedList: obj list = [| |> should equal """ -let nestedList: obj list = +let nestedList: list = [| "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1666,7 +1666,7 @@ let ``line comment before nested ] should be preserved`` () = formatSourceString false """ -let nestedList: obj list = [ +let nestedList: list = [ "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1683,7 +1683,7 @@ let nestedList: obj list = [ |> should equal """ -let nestedList: obj list = +let nestedList: list = [ "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1699,7 +1699,7 @@ let ``line comment before nested |] should be preserved`` () = formatSourceString false """ -let nestedList: obj list = [| +let nestedList: list = [| "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1716,7 +1716,7 @@ let nestedList: obj list = [| |> should equal """ -let nestedList: obj list = +let nestedList: list = [| "11111111aaaaaaaaa" "22222222aaaaaaaaa" "33333333aaaaaaaaa" @@ -1871,7 +1871,7 @@ let ``calling indexed item in list, 798`` () = false """namespace Foo -type T = { A : (unit -> unit) array } +type T = { A : array<(unit -> unit)> } module F = let f (a : T) = a.A.[0] () @@ -1883,7 +1883,7 @@ module F = """ namespace Foo -type T = { A: (unit -> unit) array } +type T = { A: array<(unit -> unit)> } module F = let f (a: T) = a.A.[0]() @@ -1943,7 +1943,7 @@ let ``multiline yield expression should be indented, 882`` () = formatSourceString false """ -let choices : Foo list = +let choices : list = [ yield! getMore 9 yield @@ -1956,7 +1956,7 @@ let choices : Foo list = |> should equal """ -let choices: Foo list = +let choices: list = [ yield! getMore 9 yield // Test @@ -1968,7 +1968,7 @@ let ``multiline yield bang inside list`` () = formatSourceString false """ -let choices : Foo list = +let choices : list = [ yield! // Test @@ -1980,7 +1980,7 @@ let choices : Foo list = |> should equal """ -let choices: Foo list = +let choices: list = [ yield! // Test [ Foo 2 ] ] diff --git a/src/Fantomas.Tests/ModuleTests.fs b/src/Fantomas.Tests/ModuleTests.fs index 62242dca49..15d793630b 100644 --- a/src/Fantomas.Tests/ModuleTests.fs +++ b/src/Fantomas.Tests/ModuleTests.fs @@ -441,9 +441,9 @@ let ``single line and multiline module decls`` () = let b = 8 type Model = { ActiveTab : ActiveTab - Trivia : Trivia list - TriviaNodes: TriviaNode list - Exception: exn option + Trivia : list + TriviaNodes: list + Exception: option IsLoading: bool ActiveByTriviaNodeIndex: int ActiveByTriviaIndex: int @@ -466,9 +466,9 @@ let b = 8 type Model = { ActiveTab: ActiveTab - Trivia: Trivia list - TriviaNodes: TriviaNode list - Exception: exn option + Trivia: list + TriviaNodes: list + Exception: option IsLoading: bool ActiveByTriviaNodeIndex: int ActiveByTriviaIndex: int @@ -492,9 +492,9 @@ let b = 8 type Model = { ActiveTab : ActiveTab - Trivia : Trivia list - TriviaNodes: TriviaNode list - Exception: exn option + Trivia : list + TriviaNodes: list + Exception: option IsLoading: bool ActiveByTriviaNodeIndex: int ActiveByTriviaIndex: int @@ -518,9 +518,9 @@ let b = 8 type Model = { ActiveTab: ActiveTab - Trivia: Trivia list - TriviaNodes: TriviaNode list - Exception: exn option + Trivia: list + TriviaNodes: list + Exception: option IsLoading: bool ActiveByTriviaNodeIndex: int ActiveByTriviaIndex: int diff --git a/src/Fantomas.Tests/MultiLineLambdaClosingNewlineTests.fs b/src/Fantomas.Tests/MultiLineLambdaClosingNewlineTests.fs index 6d59d93e5d..99d87fa0a5 100644 --- a/src/Fantomas.Tests/MultiLineLambdaClosingNewlineTests.fs +++ b/src/Fantomas.Tests/MultiLineLambdaClosingNewlineTests.fs @@ -571,7 +571,7 @@ namespace Bar [] module Foo = /// Blah - let bang<'a when 'a : equality> (a : Foo<'a>) (ans : ('a * System.TimeSpan) list) : bool = + let bang<'a when 'a : equality> (a : Foo<'a>) (ans : list<('a * System.TimeSpan)>) : bool = List.length x = List.length y && List.forall2 @@ -600,7 +600,7 @@ namespace Bar [] module Foo = /// Blah - let bang<'a when 'a : equality> (a : Foo<'a>) (ans : ('a * System.TimeSpan) list) : bool = + let bang<'a when 'a : equality> (a : Foo<'a>) (ans : list<('a * System.TimeSpan)>) : bool = List.length x = List.length y && List.forall2 // @@ -619,7 +619,7 @@ namespace Bar [] module Foo = /// Blah - let bang<'a when 'a : equality> (a : Foo<'a>) (ans : ('a * System.TimeSpan) list) : bool = + let bang<'a when 'a : equality> (a : Foo<'a>) (ans : list<('a * System.TimeSpan)>) : bool = List.length x = List.length y && List.forall2 // @@ -647,7 +647,7 @@ namespace Bar [] module Foo = /// Blah - let bang<'a when 'a : equality> (a : Foo<'a>) (ans : ('a * System.TimeSpan) list) : bool = + let bang<'a when 'a : equality> (a : Foo<'a>) (ans : list<('a * System.TimeSpan)>) : bool = List.length x = List.length y && List.forall2 // diff --git a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs index c19835c67b..a4205af328 100644 --- a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs +++ b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs @@ -783,7 +783,7 @@ type Args = { [] [] [] - Hi: int list } + Hi: list } module Foo = @@ -800,7 +800,7 @@ type Args = [] [] [] - Hi : int list + Hi : list } module Foo = @@ -1052,12 +1052,12 @@ let ``record with an access modifier and a static member`` () = type RequestParser<'ctx, 'a> = internal { consumedFields: Set - parse: 'ctx -> Request -> Async> - prohibited: ProhibitedRequestGetter list } + parse: 'ctx -> Request -> Async>> + prohibited: list } static member internal Create ( - consumedFields, parse: 'ctx -> Request -> Async> + consumedFields, parse: 'ctx -> Request -> Async>> ) : RequestParser<'ctx, 'a> = { consumedFields = consumedFields parse = parse @@ -1074,14 +1074,14 @@ type RequestParser<'ctx, 'a> = internal { consumedFields : Set - parse : 'ctx -> Request -> Async> - prohibited : ProhibitedRequestGetter list + parse : 'ctx -> Request -> Async>> + prohibited : list } static member internal Create ( consumedFields, - parse : 'ctx -> Request -> Async> + parse : 'ctx -> Request -> Async>> ) : RequestParser<'ctx, 'a> = diff --git a/src/Fantomas.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs b/src/Fantomas.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs index 6b77bd479e..f01e11a3ad 100644 --- a/src/Fantomas.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs +++ b/src/Fantomas.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs @@ -327,7 +327,7 @@ let ``newline before interface, 1346`` () = false """ type andSeq<'t> = - | AndSeq of 't seq + | AndSeq of seq<'t> interface IEnumerable<'t> with member this.GetEnumerator(): Collections.IEnumerator = @@ -341,7 +341,7 @@ type andSeq<'t> = equal """ type andSeq<'t> = - | AndSeq of 't seq + | AndSeq of seq<'t> interface IEnumerable<'t> with member this.GetEnumerator() : Collections.IEnumerator = diff --git a/src/Fantomas.Tests/NumberOfItemsRecordTests.fs b/src/Fantomas.Tests/NumberOfItemsRecordTests.fs index d45a4b1f7e..5ae7347bbb 100644 --- a/src/Fantomas.Tests/NumberOfItemsRecordTests.fs +++ b/src/Fantomas.Tests/NumberOfItemsRecordTests.fs @@ -722,7 +722,7 @@ type Args = { [] [] [] - Hi: int list } + Hi: list } module Foo = @@ -738,7 +738,7 @@ type Args = { [] [] [] - Hi: int list } + Hi: list } module Foo = @@ -834,7 +834,7 @@ let ``number of items sized record definitions are formatted properly`` () = formatSourceString false """ -type R = { a: int; b: string; c: float option } +type R = { a: int; b: string; c: option } type S = { AReallyLongExpressionThatIsMuchLongerThan50Characters: int } """ { config with @@ -846,7 +846,7 @@ type S = { AReallyLongExpressionThatIsMuchLongerThan50Characters: int } type R = { a: int b: string - c: float option } + c: option } type S = { AReallyLongExpressionThatIsMuchLongerThan50Characters: int } """ @@ -858,7 +858,7 @@ let ``number of items sized record definitions with multiline block brackets on formatSourceString false """ -type R = { a: int; b: string; c: float option } +type R = { a: int; b: string; c: option } type S = { AReallyLongExpressionThatIsMuchLongerThan50Characters: int } """ { config with @@ -872,7 +872,7 @@ type R = { a: int b: string - c: float option + c: option } type S = { AReallyLongExpressionThatIsMuchLongerThan50Characters: int } diff --git a/src/Fantomas.Tests/PatternMatchingTests.fs b/src/Fantomas.Tests/PatternMatchingTests.fs index 8d6f3760bc..23444c16e4 100644 --- a/src/Fantomas.Tests/PatternMatchingTests.fs +++ b/src/Fantomas.Tests/PatternMatchingTests.fs @@ -390,14 +390,14 @@ let ``should put brackets around app type tests`` () = false """ match item.Item with -| :? (Instruction seq) -> ()""" +| :? (seq) -> ()""" config |> prepend newline |> should equal """ match item.Item with -| :? (Instruction seq) -> () +| :? (seq) -> () """ [] diff --git a/src/Fantomas.Tests/RecordTests.fs b/src/Fantomas.Tests/RecordTests.fs index 8e323953ed..dc4ec1557e 100644 --- a/src/Fantomas.Tests/RecordTests.fs +++ b/src/Fantomas.Tests/RecordTests.fs @@ -1360,12 +1360,12 @@ let ``record with an access modifier and a static member, 1300, 657`` () = type RequestParser<'ctx, 'a> = internal { consumedFields: Set - parse: 'ctx -> Request -> Async> - prohibited: ProhibitedRequestGetter list } + parse: 'ctx -> Request -> Async>> + prohibited: list } static member internal Create ( - consumedFields, parse: 'ctx -> Request -> Async> + consumedFields, parse: 'ctx -> Request -> Async>> ) : RequestParser<'ctx, 'a> = { consumedFields = consumedFields parse = parse @@ -1380,13 +1380,13 @@ type RequestParser<'ctx, 'a> = type RequestParser<'ctx, 'a> = internal { consumedFields: Set - parse: 'ctx -> Request -> Async> - prohibited: ProhibitedRequestGetter list } + parse: 'ctx -> Request -> Async>> + prohibited: list } static member internal Create ( consumedFields, - parse: 'ctx -> Request -> Async> + parse: 'ctx -> Request -> Async>> ) : RequestParser<'ctx, 'a> = { consumedFields = consumedFields parse = parse diff --git a/src/Fantomas.Tests/SignatureTests.fs b/src/Fantomas.Tests/SignatureTests.fs index 4d00b4f8e7..d399128ca9 100644 --- a/src/Fantomas.Tests/SignatureTests.fs +++ b/src/Fantomas.Tests/SignatureTests.fs @@ -299,7 +299,7 @@ module Teq = /// Returns a Teq when the two type parameters have the same value, /// otherwise returns None. - val tryRefl<'a, 'b> : Teq<'a, 'b> option + val tryRefl<'a, 'b> : option> /// Order isn't important /// a = b => b = a @@ -351,22 +351,22 @@ module Teq = val believeMe<'a, 'b, 'a2, 'b2> : Teq<'a, 'b> -> Teq<'a2, 'b2> /// Given a type equality between two types, returns the type equality on the corresponding array types. - val array<'a, 'b> : Teq<'a, 'b> -> Teq<'a array, 'b array> + val array<'a, 'b> : Teq<'a, 'b> -> Teq, array<'b>> /// Given a type equality between two array types, returns the type equality on the corresponding element types. - val arrayOf<'a, 'b> : Teq<'a array, 'b array> -> Teq<'a, 'b> + val arrayOf<'a, 'b> : Teq, array<'b>> -> Teq<'a, 'b> /// Given a type equality between two types, returns the type equality on the corresponding list types. - val list<'a, 'b> : Teq<'a, 'b> -> Teq<'a list, 'b list> + val list<'a, 'b> : Teq<'a, 'b> -> Teq, list<'b>> /// Given a type equality between two list types, returns the type equality on the corresponding element types. - val listOf<'a, 'b> : Teq<'a list, 'b list> -> Teq<'a, 'b> + val listOf<'a, 'b> : Teq, list<'b>> -> Teq<'a, 'b> /// Given a type equality between two types, returns the type equality on the corresponding option types. - val option<'a, 'b> : Teq<'a, 'b> -> Teq<'a option, 'b option> + val option<'a, 'b> : Teq<'a, 'b> -> Teq, option<'b>> /// Given a type equality between two option types, returns the type equality on the corresponding element types. - val optionOf<'a, 'b> : Teq<'a option, 'b option> -> Teq<'a, 'b> + val optionOf<'a, 'b> : Teq, option<'b>> -> Teq<'a, 'b> /// Given a type equality between two types 'domain1 and 'domain2, returns the type equality /// on the function types ('domain1 -> 'range) and ('domain2 -> 'range), for any arbitrary 'range. @@ -421,7 +421,7 @@ module Teq = /// Returns a Teq when the two type parameters have the same value, /// otherwise returns None. - val tryRefl<'a, 'b> : Teq<'a, 'b> option + val tryRefl<'a, 'b> : option> /// Order isn't important /// a = b => b = a @@ -473,22 +473,22 @@ module Teq = val believeMe<'a, 'b, 'a2, 'b2> : Teq<'a, 'b> -> Teq<'a2, 'b2> /// Given a type equality between two types, returns the type equality on the corresponding array types. - val array<'a, 'b> : Teq<'a, 'b> -> Teq<'a array, 'b array> + val array<'a, 'b> : Teq<'a, 'b> -> Teq, array<'b>> /// Given a type equality between two array types, returns the type equality on the corresponding element types. - val arrayOf<'a, 'b> : Teq<'a array, 'b array> -> Teq<'a, 'b> + val arrayOf<'a, 'b> : Teq, array<'b>> -> Teq<'a, 'b> /// Given a type equality between two types, returns the type equality on the corresponding list types. - val list<'a, 'b> : Teq<'a, 'b> -> Teq<'a list, 'b list> + val list<'a, 'b> : Teq<'a, 'b> -> Teq, list<'b>> /// Given a type equality between two list types, returns the type equality on the corresponding element types. - val listOf<'a, 'b> : Teq<'a list, 'b list> -> Teq<'a, 'b> + val listOf<'a, 'b> : Teq, list<'b>> -> Teq<'a, 'b> /// Given a type equality between two types, returns the type equality on the corresponding option types. - val option<'a, 'b> : Teq<'a, 'b> -> Teq<'a option, 'b option> + val option<'a, 'b> : Teq<'a, 'b> -> Teq, option<'b>> /// Given a type equality between two option types, returns the type equality on the corresponding element types. - val optionOf<'a, 'b> : Teq<'a option, 'b option> -> Teq<'a, 'b> + val optionOf<'a, 'b> : Teq, option<'b>> -> Teq<'a, 'b> /// Given a type equality between two types 'domain1 and 'domain2, returns the type equality /// on the function types ('domain1 -> 'range) and ('domain2 -> 'range), for any arbitrary 'range. @@ -566,7 +566,7 @@ open FSharp.Compiler.SourceCodeServices [] type CodeFormatter = /// Parse a source string using given config - static member ParseAsync : fileName:string * source:SourceOrigin * parsingOptions: FSharpParsingOptions * checker:FSharpChecker -> Async<(ParsedInput * string list) array> + static member ParseAsync : fileName:string * source:SourceOrigin * parsingOptions: FSharpParsingOptions * checker:FSharpChecker -> Async)>> """ config |> prepend newline @@ -586,7 +586,7 @@ type CodeFormatter = /// Parse a source string using given config static member ParseAsync : fileName: string * source: SourceOrigin * parsingOptions: FSharpParsingOptions * checker: FSharpChecker -> - Async<(ParsedInput * string list) array> + Async)>> """ [] @@ -614,7 +614,7 @@ let ``operator with constraint`` () = formatSourceString true """namespace Bar - val inline (.+.) : x : ^a Foo -> y : ^b Foo -> ^c Foo when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) + val inline (.+.) : x : Foo< ^a > -> y : Foo< ^b > -> Foo< ^c > when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) """ { config with SpaceBeforeColon = true } |> prepend newline @@ -623,7 +623,7 @@ let ``operator with constraint`` () = """ namespace Bar -val inline (.+.) : x : ^a Foo -> y : ^b Foo -> ^c Foo when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) +val inline (.+.) : x : Foo< ^a > -> y : Foo< ^b > -> Foo< ^c > when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) """ [] @@ -631,7 +631,7 @@ let ``operator with named constraint`` () = formatSourceString true """namespace Bar - val inline (.+.) : x : ^a Foo -> y : ^b Foo -> z: ^c Foo when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) + val inline (.+.) : x : Foo< ^a > -> y : Foo< ^b > -> z: Foo< ^c > when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) """ { config with SpaceBeforeColon = true } |> prepend newline @@ -640,7 +640,7 @@ let ``operator with named constraint`` () = """ namespace Bar -val inline (.+.) : x : ^a Foo -> y : ^b Foo -> z : ^c Foo when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) +val inline (.+.) : x : Foo< ^a > -> y : Foo< ^b > -> z : Foo< ^c > when (^a or ^b) : (static member (+) : ^a * ^b -> ^c) """ [] @@ -668,7 +668,7 @@ let ``internal keyword before short record type, 830`` () = formatSourceString true """namespace Bar -type 'a Baz = +type Baz<'a> = internal { Value : 'a } @@ -680,7 +680,7 @@ type 'a Baz = """ namespace Bar -type 'a Baz = internal { Value: 'a } +type Baz<'a> = internal { Value: 'a } """ [] @@ -710,7 +710,7 @@ let ``multiple constraints on function declaration, 886`` () = """namespace Blah module Foo = - val inline sum : ('a -> ^value) -> 'a Foo -> ^value + val inline sum : ('a -> ^value) -> Foo<'a> -> ^value when ^value : (static member (+) : ^value * ^value -> ^value) and ^value : (static member Zero : ^value) """ config @@ -721,7 +721,7 @@ module Foo = namespace Blah module Foo = - val inline sum : ('a -> ^value) -> 'a Foo -> ^value + val inline sum : ('a -> ^value) -> Foo<'a> -> ^value when ^value: (static member (+) : ^value * ^value -> ^value) and ^value: (static member Zero : ^value) """ @@ -886,9 +886,9 @@ let ``don't add duplicate parentheses for TypeAbbrev, 1057`` () = formatSourceString false """ -type AB = A -> B list * C -> D -type AB = A -> (B list * C -> D) -type AB = A -> ((B list * C -> D)) +type AB = A -> list * C -> D +type AB = A -> (list * C -> D) +type AB = A -> ((list * C -> D)) type AB = A -> (C -> D) """ @@ -897,9 +897,9 @@ type AB = A -> (C -> D) |> should equal """ -type AB = A -> B list * C -> D -type AB = A -> (B list * C -> D) -type AB = A -> ((B list * C -> D)) +type AB = A -> list * C -> D +type AB = A -> (list * C -> D) +type AB = A -> ((list * C -> D)) type AB = A -> (C -> D) """ @@ -911,7 +911,7 @@ let ``don't add duplicate parentheses for TypeAbbrev in signature file`` () = """ namespace Foo -type AB = A -> (B list * C -> D) +type AB = A -> (list * C -> D) """ config |> prepend newline @@ -920,7 +920,7 @@ type AB = A -> (B list * C -> D) """ namespace Foo -type AB = A -> (B list * C -> D) +type AB = A -> (list * C -> D) """ [] @@ -1306,7 +1306,7 @@ let ``comment above first DU case`` () = """ namespace Baz -type 'a Bar = +type Bar<'a> = /// | Foo /// @@ -1319,7 +1319,7 @@ type 'a Bar = """ namespace Baz -type 'a Bar = +type Bar<'a> = /// | Foo /// @@ -1548,7 +1548,7 @@ let ``long multiline prefix type name should be indented far enough, 1687`` () = namespace Foo type Bar = - member Hello : thing : XLongLongLongLongLongLongLongLong 'a, bool -> 'b, bool -> 'c, bool -> 'd, bool -> ('e -> 'f) -> 'g, ('h -> 'i) -> 'j> * item : int list -> LongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong + member Hello : thing : XLongLongLongLongLongLongLongLong 'a, bool -> 'b, bool -> 'c, bool -> 'd, bool -> ('e -> 'f) -> 'g, ('h -> 'i) -> 'j> * item : list -> LongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong """ { config with SpaceBeforeUppercaseInvocation = true @@ -1569,7 +1569,7 @@ type Bar = thing : XLongLongLongLongLongLongLongLong 'a, bool -> 'b, bool -> 'c, bool -> 'd, bool -> ('e -> 'f) -> 'g, ('h -> 'i) -> 'j> - * item : int list -> + * item : list -> LongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong """ diff --git a/src/Fantomas.Tests/SpecialConstructsTests.fs b/src/Fantomas.Tests/SpecialConstructsTests.fs index 73c0479659..4335236243 100644 --- a/src/Fantomas.Tests/SpecialConstructsTests.fs +++ b/src/Fantomas.Tests/SpecialConstructsTests.fs @@ -23,7 +23,7 @@ let ``don't add whitespace in chained accessors, 566`` () = formatSourceString false """type F = - abstract G : int list -> Map + abstract G : list -> Map let x : F = { new F with member __.G _ = Map.empty } x.G[].TryFind 3 @@ -37,7 +37,7 @@ x.G[].TryFind 3 equal """ type F = - abstract G : int list -> Map + abstract G : list -> Map let x: F = {new F with diff --git a/src/Fantomas.Tests/TriviaTests.fs b/src/Fantomas.Tests/TriviaTests.fs index 8ef14d0f28..c31d46dcef 100644 --- a/src/Fantomas.Tests/TriviaTests.fs +++ b/src/Fantomas.Tests/TriviaTests.fs @@ -490,7 +490,7 @@ let ``multiple line comments form a single trivia`` () = /// more freedom about typechecking these expressions. /// LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) type LongIdentWithDots = - | LongIdentWithDots of id: LongIdent * dotms: range list + | LongIdentWithDots of id: LongIdent * dotms: list """ let trivia = toTrivia source |> List.head diff --git a/src/Fantomas.Tests/TypeDeclarationTests.fs b/src/Fantomas.Tests/TypeDeclarationTests.fs index 5c3a6c1abb..d10e7b6a19 100644 --- a/src/Fantomas.Tests/TypeDeclarationTests.fs +++ b/src/Fantomas.Tests/TypeDeclarationTests.fs @@ -692,8 +692,8 @@ let ``should keep brackets around type signatures`` () = formatSourceString false """ -let user_printers = ref([] : (string * (term -> unit)) list) -let the_interface = ref([] : (string * (string * hol_type)) list) +let user_printers = ref([] : list<(string * (term -> unit))>) +let the_interface = ref([] : list<(string * (string * hol_type))>) """ { config with MaxValueBindingWidth = 50 } @@ -701,8 +701,8 @@ let the_interface = ref([] : (string * (string * hol_type)) list) |> should equal """ -let user_printers = ref ([]: (string * (term -> unit)) list) -let the_interface = ref ([]: (string * (string * hol_type)) list) +let user_printers = ref ([]: list<(string * (term -> unit))>) +let the_interface = ref ([]: list<(string * (string * hol_type))>) """ [] @@ -768,13 +768,13 @@ let ``^a needs spaces when used as a type parameter`` () = formatSourceString false """ -let inline tryAverage(seq: seq< ^a >): ^a option = None""" +let inline tryAverage(seq: seq< ^a >): option< ^a > = None""" config |> prepend newline |> should equal """ -let inline tryAverage (seq: seq< ^a >) : ^a option = None +let inline tryAverage (seq: seq< ^a >) : option< ^a > = None """ [] @@ -782,13 +782,13 @@ let ``multiple hats need spaces`` () = formatSourceString false """ -let inline tryAverage(map: Map< ^a,^b>): ^a option = None""" +let inline tryAverage(map: Map< ^a,^b>): option< ^a > = None""" config |> prepend newline |> should equal """ -let inline tryAverage (map: Map< ^a, ^b >) : ^a option = None +let inline tryAverage (map: Map< ^a, ^b >) : option< ^a > = None """ [] @@ -1177,7 +1177,7 @@ type Item = type Exit = | Passable of Details * desitnation: Room | Locked of Details * key: Item * next: Exit - | NoExit of Details option + | NoExit of option
and Exits = { North: Exit @@ -1187,7 +1187,7 @@ and Exits = and Room = { Details: Details - Items: Item list + Items: list Exits: Exits } """ config @@ -1204,7 +1204,7 @@ type Item = { Details: Details } type Exit = | Passable of Details * desitnation: Room | Locked of Details * key: Item * next: Exit - | NoExit of Details option + | NoExit of option
and Exits = { North: Exit @@ -1214,7 +1214,7 @@ and Exits = and Room = { Details: Details - Items: Item list + Items: list Exits: Exits } """ @@ -1227,7 +1227,7 @@ let ``don't add additional newlines between recursive type declarations with att type Exit = | Passable of Details * desitnation: Room | Locked of Details * key: Item * next: Exit - | NoExit of Details option + | NoExit of option
and Exits = { North: Exit @@ -1237,7 +1237,7 @@ and Exits = and [] Room = { Details: Details - Items: Item list + Items: list Exits: Exits } """ config @@ -1250,7 +1250,7 @@ module Game type Exit = | Passable of Details * desitnation: Room | Locked of Details * key: Item * next: Exit - | NoExit of Details option + | NoExit of option
and Exits = { North: Exit @@ -1260,7 +1260,7 @@ and Exits = and [] Room = { Details: Details - Items: Item list + Items: list Exits: Exits } """ @@ -1305,10 +1305,10 @@ let ``line comment above single line abstract slot should not make it multiline, false """[] type Graph2dOptions = - abstract zoomMin: float option with get, set - // abstract moment: MomentConstructor option with get, set - abstract maxHeight: HeightWidthType option with get, set - abstract zIndex: float option with get, set + abstract zoomMin: option with get, set + // abstract moment: option with get, set + abstract maxHeight: option with get, set + abstract zIndex: option with get, set """ config |> prepend newline @@ -1317,10 +1317,10 @@ type Graph2dOptions = """ [] type Graph2dOptions = - abstract zoomMin : float option with get, set - // abstract moment: MomentConstructor option with get, set - abstract maxHeight : HeightWidthType option with get, set - abstract zIndex : float option with get, set + abstract zoomMin : option with get, set + // abstract moment: option with get, set + abstract maxHeight : option with get, set + abstract zIndex : option with get, set """ [] @@ -1776,7 +1776,7 @@ type SubGroupStackOptions = [] type DataGroup = - abstract className: string option with get, set + abstract className: option with get, set """ config |> prepend newline @@ -1790,7 +1790,7 @@ type SubGroupStackOptions = [] type DataGroup = - abstract className : string option with get, set + abstract className : option with get, set """ [] @@ -1847,7 +1847,7 @@ let ``attribute on type and abstract member followed by type, 949`` () = [] type TimelineOptionsGroupCallbackFunction = [] - abstract Invoke: group:TimelineGroup * callback:(TimelineGroup option -> unit) -> unit + abstract Invoke: group:TimelineGroup * callback:(option -> unit) -> unit type TimelineOptionsGroupEditableType = U2 """ @@ -1859,7 +1859,7 @@ type TimelineOptionsGroupEditableType = U2 [] type TimelineOptionsGroupCallbackFunction = [] - abstract Invoke : group: TimelineGroup * callback: (TimelineGroup option -> unit) -> unit + abstract Invoke : group: TimelineGroup * callback: (option -> unit) -> unit type TimelineOptionsGroupEditableType = U2 """ @@ -1872,7 +1872,7 @@ let ``attribute on type and abstract member followed by let binding`` () = [] type TimelineOptionsGroupCallbackFunction = [] - abstract Invoke: group:TimelineGroup * callback:(TimelineGroup option -> unit) -> unit + abstract Invoke: group:TimelineGroup * callback:(option -> unit) -> unit let myBinding a = 7 """ @@ -1884,7 +1884,7 @@ let myBinding a = 7 [] type TimelineOptionsGroupCallbackFunction = [] - abstract Invoke : group: TimelineGroup * callback: (TimelineGroup option -> unit) -> unit + abstract Invoke : group: TimelineGroup * callback: (option -> unit) -> unit let myBinding a = 7 """ @@ -2247,7 +2247,7 @@ let ``generic recursive types`` () = false """ type ViewBinding<'model,'msg> = string * Variable<'model,'msg> -and ViewBindings<'model,'msg> = ViewBinding<'model,'msg> list +and ViewBindings<'model,'msg> = list> and Variable<'model,'msg> = | Bind of Getter<'model> | BindTwoWay of Getter<'model> * Setter<'model,'msg> @@ -2262,7 +2262,7 @@ and Variable<'model,'msg> = equal """ type ViewBinding<'model, 'msg> = string * Variable<'model, 'msg> -and ViewBindings<'model, 'msg> = ViewBinding<'model, 'msg> list +and ViewBindings<'model, 'msg> = list> and Variable<'model, 'msg> = | Bind of Getter<'model> @@ -2288,8 +2288,8 @@ let ``add newline and indent for multiline internal record definition, 658`` () """ type RequestParser<'ctx, 'a> = internal { consumedFields: Set - parse: 'ctx -> Request -> Async> - prohibited: ProhibitedRequestGetter list + parse: 'ctx -> Request -> Async>> + prohibited: list } """ config @@ -2300,8 +2300,8 @@ type RequestParser<'ctx, 'a> = internal { type RequestParser<'ctx, 'a> = internal { consumedFields: Set - parse: 'ctx -> Request -> Async> - prohibited: ProhibitedRequestGetter list } + parse: 'ctx -> Request -> Async>> + prohibited: list } """ [] diff --git a/src/Fantomas.Tests/UnionTests.fs b/src/Fantomas.Tests/UnionTests.fs index 8ee8d52a97..69ce4914d9 100644 --- a/src/Fantomas.Tests/UnionTests.fs +++ b/src/Fantomas.Tests/UnionTests.fs @@ -54,7 +54,7 @@ let ``discriminated unions with members`` () = type Type = TyLam of Type * Type | TyVar of string - | TyCon of string * Type list + | TyCon of string * list with override this.ToString() = match this with | TyLam (t1, t2) -> sprintf "(%s -> %s)" (t1.ToString()) (t2.ToString()) @@ -68,7 +68,7 @@ type Type type Type = | TyLam of Type * Type | TyVar of string - | TyCon of string * Type list + | TyCon of string * list override this.ToString() = match this with | TyLam (t1, t2) -> sprintf "(%s -> %s)" (t1.ToString()) (t2.ToString()) @@ -84,7 +84,7 @@ let ``newline between discriminated unions and members`` () = type Type = TyLam of Type * Type | TyVar of string - | TyCon of string * Type list + | TyCon of string * list with override this.ToString() = match this with | TyLam (t1, t2) -> sprintf "(%s -> %s)" (t1.ToString()) (t2.ToString()) @@ -99,7 +99,7 @@ type Type type Type = | TyLam of Type * Type | TyVar of string - | TyCon of string * Type list + | TyCon of string * list override this.ToString() = match this with @@ -361,7 +361,7 @@ type PayableFilters = | [] Status let ``single case DU with comment above clause, 567`` () = formatSourceString false - """type 'a MyGenericType = + """type MyGenericType<'a> = /// Foo """ @@ -370,7 +370,7 @@ let ``single case DU with comment above clause, 567`` () = |> should equal """ -type 'a MyGenericType = +type MyGenericType<'a> = /// Foo """ @@ -569,10 +569,10 @@ type SynType = /// isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict" | App of typeName: SynType * - lessRange: range option * - typeArgs: SynType list * - commaRanges: range list * - greaterRange: range option * + lessRange: option * + typeArgs: list * + commaRanges: list * + greaterRange: option * isPostfix: bool * range: range // interstitial commas """ config @@ -590,10 +590,10 @@ type SynType = /// isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict" | App of typeName: SynType * - lessRange: range option * - typeArgs: SynType list * - commaRanges: range list * - greaterRange: range option * + lessRange: option * + typeArgs: list * + commaRanges: list * + greaterRange: option * isPostfix: bool * range: range // interstitial commas """ @@ -605,8 +605,8 @@ let ``multiline single union case field`` () = """ namespace X -type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list -type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted list +type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * list +type ResolvedExtensionReference = ResolvedExtensionReference of string * list * list> """ config |> prepend newline @@ -615,10 +615,10 @@ type ResolvedExtensionReference = ResolvedExtensionReference of string * Assembl """ namespace X -type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list +type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * list type ResolvedExtensionReference = - | ResolvedExtensionReference of string * AssemblyReference list * Tainted list + | ResolvedExtensionReference of string * list * list> """ [] @@ -628,8 +628,8 @@ let ``multiline single union case field, implementation file`` () = """ namespace X -type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list -type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted list +type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * list +type ResolvedExtensionReference = ResolvedExtensionReference of string * list * list> """ config |> prepend newline @@ -638,10 +638,10 @@ type ResolvedExtensionReference = ResolvedExtensionReference of string * Assembl """ namespace X -type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list +type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * list type ResolvedExtensionReference = - | ResolvedExtensionReference of string * AssemblyReference list * Tainted list + | ResolvedExtensionReference of string * list * list> """ [] @@ -761,7 +761,7 @@ let ``multiline DU case`` () = [] type SynBinding = SynBinding of - accessibility: SynAccess option * + accessibility: option * kind: SynBindingKind * mustInline: bool * isMutable: bool * @@ -769,7 +769,7 @@ type SynBinding = xmlDoc: PreXmlDoc * valData: SynValData * headPat: SynPat * - returnInfo: SynBindingReturnInfo option * + returnInfo: option * expr: SynExpr * range: range * seqPoint: DebugPointAtBinding @@ -782,7 +782,7 @@ type SynBinding = [] type SynBinding = | SynBinding of - accessibility: SynAccess option * + accessibility: option * kind: SynBindingKind * mustInline: bool * isMutable: bool * @@ -790,7 +790,7 @@ type SynBinding = xmlDoc: PreXmlDoc * valData: SynValData * headPat: SynPat * - returnInfo: SynBindingReturnInfo option * + returnInfo: option * expr: SynExpr * range: range * seqPoint: DebugPointAtBinding diff --git a/src/Fantomas.Tests/UtilsTests.fs b/src/Fantomas.Tests/UtilsTests.fs index 28183552dd..086d0cbd0a 100644 --- a/src/Fantomas.Tests/UtilsTests.fs +++ b/src/Fantomas.Tests/UtilsTests.fs @@ -130,7 +130,7 @@ let ``when input is empty`` () = [] let ``when predicate always returns false`` () = - let property (xs: int list) : bool = + let property (xs: list) : bool = let before, after = List.partitionWhile (fun _ _ -> false) xs @@ -140,7 +140,7 @@ let ``when predicate always returns false`` () = [] let ``when predicate always returns true`` () = - let property (xs: int list) : bool = + let property (xs: list) : bool = let before, after = List.partitionWhile (fun _ _ -> true) xs @@ -150,7 +150,7 @@ let ``when predicate always returns true`` () = [] let ``when predicate returns true until certain index`` () = - let property (xs: int list, i: int) : bool = + let property (xs: list, i: int) : bool = let before, after = List.partitionWhile (fun index _ -> i <> index) xs