Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

update FCS to 1.4.0.8 #1176

Conversation

vasily-kirichenko
Copy link
Contributor

No description provided.

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

This seems to make some improvement when using the F# compiler solutions. However the memory still grows very, very high (after one round of major reductions presumably due to this change). I'll put more details here when I have them : ttps://github.com//issues/1160

@vasily-kirichenko
Copy link
Contributor Author

@dungpa it seems to break all GoToDefinitionTests. Any ideas?

@dungpa
Copy link
Contributor

dungpa commented Oct 15, 2015

@dsyme It seems that fsharp/fsharp-compiler-docs#442 has changed the output of FSharpType.Format considerably.

@vasily-kirichenko Could you add printfn "Output signature: %s" signature before failwithf at https://github.com/fsprojects/VisualFSharpPowerTools/blob/0fc4314320fb97cdad9249da1bf3fe21eaafb160/tests/FSharpVSPowerTools.Core.Tests/GoToDefinitionTests.fs#L113 to see how results have changed.

@vasily-kirichenko
Copy link
Contributor Author

------ Test started: Assembly: FSharpVSPowerTools.Core.Tests.dll ------

Output signature: namespace Microsoft.FSharp.Control

open System

/// This static class holds members for creating and manipulating asynchronous computations.
[<Sealed>]
[<CompiledName("FSharpAsync")>]
[<Class>]
type Async =
    /// Creates three functions that can be used to implement the .NET Asynchronous 
    /// Programming Model (APM) for a given asynchronous computation.
    static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
    /// Creates an asynchronous computation that waits for a single invocation of a CLI 
    /// event by adding a handler to the event. Once the computation completes or is 
    /// cancelled, the handler is removed from the event.
    static member AwaitEvent : event:IEvent<'Del,'T> when 'Del : delegate<'T,unit> and 'Del :> Delegate * ?cancelAction:(unit -> unit) -> Async<'T> when 'Del : delegate<'T, unit> and 'Del :> Delegate
    /// Creates an asynchronous computation that will wait on the IAsyncResult.
    static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
    /// 
    /// Return an asynchronous computation that will wait for the given task to complete and return
    /// its result.
    /// 
    static member AwaitTask : task:Threading.Tasks.Task<'T> -> Async<'T>
    /// Creates an asynchronous computation that will wait on the given WaitHandle.
    static member AwaitWaitHandle : waitHandle:Threading.WaitHandle * ?millisecondsTimeout:int -> Async<bool>
    /// Raises the cancellation condition for the most recent set of asynchronous computations started 
    /// without any specific CancellationToken. Replaces the global CancellationTokenSource with a new 
    /// global token source for any asynchronous computations created after this point without any 
    /// specific CancellationToken.
    static member CancelDefaultToken : unit -> unit
    /// Creates an asynchronous computation that returns the CancellationToken governing the execution 
    /// of the computation.
    static member CancellationToken : Async<Threading.CancellationToken>
    /// Creates an asynchronous computation that executes computation.
    /// If this computation completes successfully then return Choice1Of2 with the returned
    /// value. If this computation raises an exception before it completes then return Choice2Of2
    /// with the raised exception.
    static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
    /// Gets the default cancellation token for executing asynchronous computations.
    static member DefaultCancellationToken : Threading.CancellationToken
    /// Creates an asynchronous computation in terms of a Begin/End pair of actions in 
    /// the style used in CLI APIs. This overlaod should be used if the operation is 
    /// qualified by three arguments. For example, 
    /// Async.FromBeginEnd(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather)
    /// When the computation is run, beginFunc is executed, with
    /// a callback which represents the continuation of the computation. 
    /// When the callback is invoked, the overall result is fetched using endFunc.
    static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
    /// Creates an asynchronous computation in terms of a Begin/End pair of actions in 
    /// the style used in CLI APIs. For example, 
    /// Async.FromBeginEnd(ws.BeginGetWeather,ws.EndGetWeather)
    /// When the computation is run, beginFunc is executed, with
    /// a callback which represents the continuation of the computation. 
    /// When the callback is invoked, the overall result is fetched using endFunc.
    static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
    /// Creates an asynchronous computation in terms of a Begin/End pair of actions in 
    /// the style used in CLI APIs. This overlaod should be used if the operation is 
    /// qualified by two arguments. For example, 
    /// Async.FromBeginEnd(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather)
    /// When the computation is run, beginFunc is executed, with
    /// a callback which represents the continuation of the computation. 
    /// When the callback is invoked, the overall result is fetched using endFunc.
    static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
    /// Creates an asynchronous computation in terms of a Begin/End pair of actions in 
    /// the style used in CLI APIs. This overlaod should be used if the operation is 
    /// qualified by one argument. For example, 
    /// Async.FromBeginEnd(place,ws.BeginGetWeather,ws.EndGetWeather)
    /// When the computation is run, beginFunc is executed, with
    /// a callback which represents the continuation of the computation. 
    /// When the callback is invoked, the overall result is fetched using endFunc.
    static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
    /// Creates an asynchronous computation that captures the current
    /// success, exception and cancellation continuations. The callback must 
    /// eventually call exactly one of the given continuations.
    static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
    /// Creates an asynchronous computation that runs the given computation and ignores 
    /// its result.
    static member Ignore : computation:Async<'T> -> Async<unit>
    /// Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow.
    static member OnCancel : interruption:(unit -> unit) -> Async<IDisposable>
    /// Creates an asynchronous computation that executes all the given asynchronous computations, 
    /// initially queueing each as work items and using a fork/join pattern.
    static member Parallel : computations:seq<Async<'T>> -> Async<'T []>
    /// Runs the asynchronous computation and await its result.
    static member RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:Threading.CancellationToken -> 'T
    /// Creates an asynchronous computation that will sleep for the given time. This is scheduled
    /// using a System.Threading.Timer object. The operation will not block operating system threads
    /// for the duration of the wait.
    static member Sleep : millisecondsDueTime:int -> Async<unit>
    /// Starts the asynchronous computation in the thread pool. Do not await its result.
    static member Start : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
    /// Executes a computation in the thread pool.
    static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:Threading.Tasks.TaskCreationOptions * ?cancellationToken:Threading.CancellationToken -> Threading.Tasks.Task<'T>
    /// Starts a child computation within an asynchronous workflow. 
    /// This allows multiple asynchronous computations to be executed simultaneously.
    static member StartChild : computation:Async<'T> * ?millisecondsTimeout:int -> Async<Async<'T>>
    /// Creates an asynchronous computation which starts the given computation as a System.Threading.Tasks.Task
    static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:Threading.Tasks.TaskCreationOptions -> Async<Threading.Tasks.Task<'T>>
    /// Runs an asynchronous computation, starting immediately on the current operating system
    /// thread.
    static member StartImmediate : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
    /// Runs an asynchronous computation, starting immediately on the current operating system
    /// thread. Call one of the three continuations when the operation completes.
    static member StartWithContinuations : computation:Async<'T> * continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * ?cancellationToken:Threading.CancellationToken -> unit
    /// Creates an asynchronous computation that runs
    /// its continuation using syncContext.Post. If syncContext is null 
    /// then the asynchronous computation is equivalent to SwitchToThreadPool().
    static member SwitchToContext : syncContext:Threading.SynchronizationContext -> Async<unit>
    /// Creates an asynchronous computation that creates a new thread and runs
    /// its continuation in that thread.
    static member SwitchToNewThread : unit -> Async<unit>
    /// Creates an asynchronous computation that queues a work item that runs
    /// its continuation.
    static member SwitchToThreadPool : unit -> Async<unit>
    /// Creates an asynchronous computation that executes computation.
    /// If this computation is cancelled before it completes then the computation generated by 
    /// running compensation is executed.
    static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T>

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.adds necessary parenthesis to function parameters' failed: System.Exception : Type checking results in errors: [|C:\Temp.fsi (16,107)-(16,108) parse error Unexpected symbol '?' in type|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(158,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.adds necessary parenthesis to function parameters()

Output signature: module File

type MyClass< ^T when ^T : (static member ``A static member`` : unit ->  ^T when  ^T : (static member ( A static member ) : ->  ^T))> =
    class
    end

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle double-backtick identifiers on member constraints' failed:
    System.Exception : Type checking results in errors: [|C:\Temp.fsi (3,105)-(3,106) parse error Unexpected identifier in member signature;
  C:\Temp.fsi (3,103)-(3,122) parse error Attempted to parse this as an operator name, but failed;
  C:\Temp.fsi (3,125)-(3,127) parse error Unexpected symbol '->' in member signature;
  C:\Temp.fsi (5,5)-(5,8) parse error Unexpected keyword 'end' in signature file|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(1395,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle double-backtick identifiers on member constraints()

Output signature: module File

type MyClass<'T when 'T : struct> =
    new : unit -> MyClass<'T>
    member Method : x:'X when 'X : null -> int when 'X : null
    member NormalMethod : unit -> unit
    static member StaticMethod : x:('X * 'X when 'X : equality) -> bool when 'X : equality

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle generic constraints on methods' failed: System.Exception : Type checking results in errors: [|C:\Temp.fsi (5,41)-(5,43) parse error Unexpected symbol '->' in type signature. Expected incomplete structured construct at or before this point or other token.;
  C:\Temp.fsi (8,1)-(8,1) parse error Incomplete structured construct at or before this point in signature file;
  C:\Temp.fsi (5,31)-(5,33) typecheck error The type parameter 'X' is not defined|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(1222,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle generic constraints on methods()

Output signature: module File

val func : x:'X when 'X : null and 'X : comparison -> int when 'X : null and 'X : comparison

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle generic constraints on module functions and values' failed:
    System.Exception : Type checking results in errors: [|C:\Temp.fsi (3,52)-(3,54) parse error Unexpected symbol '->'. Expected incomplete structured construct at or before this point or other token.;
  C:\Temp.fsi (3,5)-(3,9) typecheck error Return values cannot have names|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(1233,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle generic constraints on module functions and values()

Output signature: /// Basic operations on arrays.
[<CompilationRepresentation(enum<CompilationRepresentationFlags> (4))>]
[<RequireQualifiedAccess>]
module Microsoft.FSharp.Collections.Array

/// Builds a new array that contains the elements of the first array followed by the elements of the second array.
val append : array1:'T [] -> array2:'T [] -> 'T []
/// Returns the average of the elements in the array.
val inline average : array: ^T [] when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T) ->  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T) when ^T : (static member ( + ) :  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T) *  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T) ->  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T)) and ^T : (static member DivideByInt :  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T) * int ->  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T)) and ^T : (static member Zero :  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member DivideByInt :  ^T * int ->  ^T) and  ^T : (static member get_Zero : ->  ^T))
/// Returns the average of the elements generated by applying the function to each element of the array.
val inline averageBy : projection:('T ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U)) -> array:'T [] ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U) when ^U : (static member ( + ) :  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U) *  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U) ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U)) and ^U : (static member DivideByInt :  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U) * int ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U)) and ^U : (static member Zero :  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member DivideByInt :  ^U * int ->  ^U) and  ^U : (static member get_Zero : ->  ^U))
/// Reads a range of elements from the first array and write them into the second.
val blit : source:'T [] -> sourceIndex:int -> target:'T [] -> targetIndex:int -> count:int -> unit
/// For each element of the array, applies the given function. Concatenates all the results and return the combined array.
val collect : mapping:('T -> 'U []) -> array:'T [] -> 'U []
/// Builds a new array that contains the elements of each of the given sequence of arrays.
val concat : arrays:seq<'T []> -> 'T []
/// Builds a new array that contains the elements of the given array.
val copy : array:'T [] -> 'T []
/// Creates an array whose elements are all initially the given value.
val create : count:int -> value:'T -> 'T []
/// Applies the given function to successive elements, returning the first
/// result where function returns Some(x) for some x. If the function 
/// never returns Some(x) then None is returned.
val tryPick : chooser:('T -> 'U option) -> array:'T [] -> 'U option
/// Fills a range of elements of the array with the given value.
val fill : target:'T [] -> targetIndex:int -> count:int -> value:'T -> unit
/// Applies the given function to successive elements, returning the first
/// result where function returns Some(x) for some x. If the function 
/// never returns Some(x) then KeyNotFoundException is raised.
val pick : chooser:('T -> 'U option) -> array:'T [] -> 'U
/// Applies the given function to each element of the array. Returns
/// the array comprised of the results "x" for each element where
/// the function returns Some(x)
val choose : chooser:('T -> 'U option) -> array:'T [] -> 'U []
/// Returns an empty array of the given type.
val empty : 'T []
/// Tests if any element of the array satisfies the given predicate.
val exists : predicate:('T -> bool) -> array:'T [] -> bool
/// Tests if any pair of corresponding elements of the arrays satisfies the given predicate.
val exists2 : predicate:('T1 -> 'T2 -> bool) -> array1:'T1 [] -> array2:'T2 [] -> bool
/// Returns a new collection containing only the elements of the collection
/// for which the given predicate returns "true".
val filter : predicate:('T -> bool) -> array:'T [] -> 'T []
/// Returns the first element for which the given function returns 'true'.
/// Raise KeyNotFoundException if no such element exists.
val find : predicate:('T -> bool) -> array:'T [] -> 'T
/// Returns the index of the first element in the array
/// that satisfies the given predicate. Raise KeyNotFoundException if 
/// none of the elements satisy the predicate.
val findIndex : predicate:('T -> bool) -> array:'T [] -> int
/// Tests if all elements of the array satisfy the given predicate.
val forall : predicate:('T -> bool) -> array:'T [] -> bool
/// Tests if all corresponding elements of the array satisfy the given predicate pairwise.
val forall2 : predicate:('T1 -> 'T2 -> bool) -> array1:'T1 [] -> array2:'T2 [] -> bool
/// Applies a function to each element of the collection, threading an accumulator argument
/// through the computation. If the input function is f and the elements are i0...iN then computes 
/// f (... (f s i0)...) iN
val fold : folder:('State -> 'T -> 'State) -> state:'State -> array:'T [] -> 'State
/// Applies a function to each element of the array, threading an accumulator argument
/// through the computation. If the input function is f and the elements are i0...iN then computes 
/// f i0 (...(f iN s))
val foldBack : folder:('T -> 'State -> 'State) -> array:'T [] -> state:'State -> 'State
/// Applies a function to pairs of elements drawn from the two collections, 
/// left-to-right, threading an accumulator argument
/// through the computation. The two input
/// arrays must have the same lengths, otherwise an ArgumentException is
/// raised.
val fold2 : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> array1:'T1 [] -> array2:'T2 [] -> 'State
/// Apply a function to pairs of elements drawn from the two collections, right-to-left, 
/// threading an accumulator argument through the computation. The two input
/// arrays must have the same lengths, otherwise an ArgumentException is
/// raised.
val foldBack2 : folder:('T1 -> 'T2 -> 'State -> 'State) -> array1:'T1 [] -> array2:'T2 [] -> state:'State -> 'State
/// Gets an element from an array.
val get : array:'T [] -> index:int -> 'T
/// Creates an array given the dimension and a generator function to compute the elements.
val inline init : count:int -> initializer:(int -> 'T) -> 'T []
/// Creates an array where the entries are initially the default value Unchecked.defaultof<'T>.
val zeroCreate : count:int -> 'T []
/// Returns true if the given array is empty, otherwise false.
val isEmpty : array:'T [] -> bool
/// Applies the given function to each element of the array.
val inline iter : action:('T -> unit) -> array:'T [] -> unit
/// Applies the given function to pair of elements drawn from matching indices in two arrays. The
/// two arrays must have the same lengths, otherwise an ArgumentException is
/// raised.
val iter2 : action:('T1 -> 'T2 -> unit) -> array1:'T1 [] -> array2:'T2 [] -> unit
/// Applies the given function to each element of the array. The integer passed to the
/// function indicates the index of element.
val iteri : action:(int -> 'T -> unit) -> array:'T [] -> unit
/// Applies the given function to pair of elements drawn from matching indices in two arrays,
/// also passing the index of the elements. The two arrays must have the same lengths, 
/// otherwise an ArgumentException is raised.
val iteri2 : action:(int -> 'T1 -> 'T2 -> unit) -> array1:'T1 [] -> array2:'T2 [] -> unit
/// Returns the length of an array. You can also use property arr.Length.
val length : array:'T [] -> int
/// Builds a new array whose elements are the results of applying the given function
/// to each of the elements of the array.
val inline map : mapping:('T -> 'U) -> array:'T [] -> 'U []
/// Builds a new collection whose elements are the results of applying the given function
/// to the corresponding elements of the two collections pairwise. The two input
/// arrays must have the same lengths, otherwise an ArgumentException is
/// raised.
val map2 : mapping:('T1 -> 'T2 -> 'U) -> array1:'T1 [] -> array2:'T2 [] -> 'U []
/// Builds a new collection whose elements are the results of applying the given function
/// to the corresponding elements of the two collections pairwise, also passing the index of 
/// the elements. The two input arrays must have the same lengths, otherwise an ArgumentException is
/// raised.
val mapi2 : mapping:(int -> 'T1 -> 'T2 -> 'U) -> array1:'T1 [] -> array2:'T2 [] -> 'U []
/// Builds a new array whose elements are the results of applying the given function
/// to each of the elements of the array. The integer index passed to the
/// function indicates the index of element being transformed.
val mapi : mapping:(int -> 'T -> 'U) -> array:'T [] -> 'U []
/// Returns the greatest of all elements of the array, compared via Operators.max on the function result.
val inline max : array:'T [] when 'T : comparison -> 'T when 'T : comparison when 'T : comparison
/// Returns the greatest of all elements of the array, compared via Operators.max on the function result.
val inline maxBy : projection:('T -> 'U when 'U : comparison) -> array:'T [] -> 'T when 'U : comparison
/// Returns the lowest of all elements of the array, compared via Operators.min.
val inline min : array:'T [] when 'T : comparison -> 'T when 'T : comparison when 'T : comparison
/// Returns the lowest of all elements of the array, compared via Operators.min on the function result.
val inline minBy : projection:('T -> 'U when 'U : comparison) -> array:'T [] -> 'T when 'U : comparison
/// Builds an array from the given list.
val ofList : list:'T list -> 'T []
/// Builds a new array from the given enumerable object.
val ofSeq : source:seq<'T> -> 'T []
/// Splits the collection into two collections, containing the 
/// elements for which the given predicate returns "true" and "false"
/// respectively.
val partition : predicate:('T -> bool) -> array:'T [] -> 'T [] * 'T []
/// Returns an array with all elements permuted according to the
/// specified permutation.
val permute : indexMap:(int -> int) -> array:'T [] -> 'T []
/// Applies a function to each element of the array, threading an accumulator argument
/// through the computation. If the input function is f and the elements are i0...iN 
/// then computes f (... (f i0 i1)...) iN.
/// Raises ArgumentException if the array has size zero.
val reduce : reduction:('T -> 'T -> 'T) -> array:'T [] -> 'T
/// Applies a function to each element of the array, threading an accumulator argument
/// through the computation. If the input function is f and the elements are i0...iN 
/// then computes f i0 (...(f iN-1 iN)).
/// Raises ArgumentException if the array has size zero.
val reduceBack : reduction:('T -> 'T -> 'T) -> array:'T [] -> 'T
/// Returns a new array with the elements in reverse order.
val rev : array:'T [] -> 'T []
/// Like fold, but return the intermediary and final results.
val scan : folder:('State -> 'T -> 'State) -> state:'State -> array:'T [] -> 'State []
/// Like foldBack, but return both the intermediary and final results.
val scanBack : folder:('T -> 'State -> 'State) -> array:'T [] -> state:'State -> 'State []
/// Sets an element of an array.
val set : array:'T [] -> index:int -> value:'T -> unit
/// Builds a new array that contains the given subrange specified by
/// starting index and length.
val sub : array:'T [] -> startIndex:int -> count:int -> 'T []
/// Sorts the elements of an array, returning a new array. Elements are compared using Operators.compare. 
val sort : array:'T [] when 'T : comparison -> 'T [] when 'T : comparison when 'T : comparison
/// Sorts the elements of an array, using the given projection for the keys and returning a new array. 
/// Elements are compared using Operators.compare.
val sortBy : projection:('T -> 'Key when 'Key : comparison) -> array:'T [] -> 'T [] when 'Key : comparison
/// Sorts the elements of an array, using the given comparison function as the order, returning a new array.
val sortWith : comparer:('T -> 'T -> int) -> array:'T [] -> 'T []
/// Sorts the elements of an array by mutating the array in-place, using the given projection for the keys. 
/// Elements are compared using Operators.compare.
val sortInPlaceBy : projection:('T -> 'Key when 'Key : comparison) -> array:'T [] -> unit when 'Key : comparison
/// Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order.
val sortInPlaceWith : comparer:('T -> 'T -> int) -> array:'T [] -> unit
/// Sorts the elements of an array by mutating the array in-place, using the given comparison function. 
/// Elements are compared using Operators.compare.
val sortInPlace : array:'T [] when 'T : comparison -> unit when 'T : comparison
/// Returns the sum of the elements in the array.
val inline sum : array: ^T [] when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member get_Zero : ->  ^T) ->  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member get_Zero : ->  ^T) when ^T : (static member ( + ) :  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member get_Zero : ->  ^T) *  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member get_Zero : ->  ^T) ->  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member get_Zero : ->  ^T)) and ^T : (static member Zero :  ^T when  ^T : (static member ( + ) :  ^T *  ^T ->  ^T) and  ^T : (static member get_Zero : ->  ^T))
/// Returns the sum of the results generated by applying the function to each element of the array.
val inline sumBy : projection:('T ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member get_Zero : ->  ^U)) -> array:'T [] ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member get_Zero : ->  ^U) when ^U : (static member ( + ) :  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member get_Zero : ->  ^U) *  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member get_Zero : ->  ^U) ->  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member get_Zero : ->  ^U)) and ^U : (static member Zero :  ^U when  ^U : (static member ( + ) :  ^U *  ^U ->  ^U) and  ^U : (static member get_Zero : ->  ^U))
/// Builds a list from the given array.
val toList : array:'T [] -> 'T list
/// Views the given array as a sequence.
val toSeq : array:'T [] -> seq<'T>
/// Returns the first element for which the given function returns true.
/// Return None if no such element exists.
val tryFind : predicate:('T -> bool) -> array:'T [] -> 'T option
/// Returns the index of the first element in the array
/// that satisfies the given predicate.
val tryFindIndex : predicate:('T -> bool) -> array:'T [] -> int option
/// Splits an array of pairs into two arrays.
val unzip : array:('T1 * 'T2) [] -> 'T1 [] * 'T2 []
/// Splits an array of triples into three arrays.
val unzip3 : array:('T1 * 'T2 * 'T3) [] -> 'T1 [] * 'T2 [] * 'T3 []
/// Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is
/// raised.
val zip : array1:'T1 [] -> array2:'T2 [] -> ('T1 * 'T2) []
/// Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is
/// raised.
val zip3 : array1:'T1 [] -> array2:'T2 [] -> array3:'T3 [] -> ('T1 * 'T2 * 'T3) []

/// Provides parallel operations on arrays 
module Parallel = 

    /// Apply the given function to each element of the array. Return
    /// the array comprised of the results "x" for each element where
    /// the function returns Some(x).
    val choose : chooser:('T -> 'U option) -> array:'T [] -> 'U []
    /// For each element of the array, apply the given function. Concatenate all the results and return the combined array.
    val collect : mapping:('T -> 'U []) -> array:'T [] -> 'U []
    /// Build a new array whose elements are the results of applying the given function
    /// to each of the elements of the array.
    val map : mapping:('T -> 'U) -> array:'T [] -> 'U []
    /// Build a new array whose elements are the results of applying the given function
    /// to each of the elements of the array. The integer index passed to the
    /// function indicates the index of element being transformed.
    val mapi : mapping:(int -> 'T -> 'U) -> array:'T [] -> 'U []
    /// Apply the given function to each element of the array. 
    val iter : action:('T -> unit) -> array:'T [] -> unit
    /// Apply the given function to each element of the array. The integer passed to the
    /// function indicates the index of element.
    val iteri : action:(int -> 'T -> unit) -> array:'T [] -> unit
    /// Create an array given the dimension and a generator function to compute the elements.
    val init : count:int -> initializer:(int -> 'T) -> 'T []
    /// Split the collection into two collections, containing the 
    /// elements for which the given predicate returns "true" and "false"
    /// respectively 
    val partition : predicate:('T -> bool) -> array:'T [] -> 'T [] * 'T []


Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle nested modules' failed: System.Exception : Type checking results in errors: [|C:\Temp.fsi (9,180)-(9,182) parse error Unexpected symbol '->' in member signature;
  C:\Temp.fsi (11,46)-(11,50) parse error Unexpected keyword 'when' in value signature. Expected ',' or other token.;
  C:\Temp.fsi (11,78)-(11,79) parse error Unexpected symbol ':'. Expected incomplete structured construct at or before this point or other token.;
  C:\Temp.fsi (11,12)-(11,21) typecheck error Return values cannot have names|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(767,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle nested modules()

Output signature: module File

type MyClass< ^T when ^T : (static member Create : unit ->  ^T when  ^T : (static member Create : ->  ^T) and  ^T : (member get_Prop :  ^T -> int)) and ^T : (member Prop : int)> =
    class
    end

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle statically resolved constraints' failed: System.Exception : Type checking results in errors: [|C:\Temp.fsi (3,99)-(3,101) parse error Unexpected symbol '->' in member signature;
  C:\Temp.fsi (5,5)-(5,8) parse error Unexpected keyword 'end' in signature file|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(1338,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle statically resolved constraints()

Output signature: [<AutoOpen>]
module Microsoft.FSharp.Core.ExtraTopLevelOperators

/// Print to stdout using the given format.
val printf : format:Printf.TextWriterFormat<'T> -> 'T
/// Print to stdout using the given format, and add a newline.
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
/// Print to stderr using the given format.
val eprintf : format:Printf.TextWriterFormat<'T> -> 'T
/// Print to stderr using the given format, and add a newline.
val eprintfn : format:Printf.TextWriterFormat<'T> -> 'T
/// Print to a string using the given format.
val sprintf : format:Printf.StringFormat<'T> -> 'T
/// Print to a string buffer and raise an exception with the given
/// result.   Helper printers must return strings.
val failwithf : format:Printf.StringFormat<'T,'Result> -> 'T
/// Print to a file using the given format.
val fprintf : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T
/// Print to a file using the given format, and add a newline.
val fprintfn : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T
/// Builds a set from a sequence of objects. The objects are indexed using generic comparison.
val set : elements:seq<'T> when 'T : comparison -> Set<'T> when 'T : comparison when 'T : comparison
/// Builds an aysnchronous workflow using computation expression syntax.
val async : AsyncBuilder
/// Converts the argument to 32-bit float.
val inline single : value: ^T when  ^T : (static member op_Explicit :  ^T -> single) -> single when ^T : (static member op_Explicit : unit -> single)
/// Converts the argument to 64-bit float.
val inline double : value: ^T when  ^T : (static member op_Explicit :  ^T -> double) -> float when ^T : (static member op_Explicit : unit -> double)
/// Converts the argument to byte.
val inline uint8 : value: ^T when  ^T : (static member op_Explicit :  ^T -> byte) -> byte when ^T : (static member op_Explicit : unit -> byte)
/// Converts the argument to signed byte.
val inline int8 : value: ^T when  ^T : (static member op_Explicit :  ^T -> sbyte) -> sbyte when ^T : (static member op_Explicit : unit -> sbyte)
/// Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality.
val dict : keyValuePairs:seq<'Key * 'Value> when 'Key : equality -> System.Collections.Generic.IDictionary<'Key,'Value> when 'Key : equality when 'Key : equality
/// Builds a 2D array from a sequence of sequences of elements.
val array2D : rows:seq<#seq<'T>> -> 'T [,] when 'c :> seq<'T>
/// Special prefix operator for splicing typed expressions into quotation holes.
val ( ~% ) : expression:Quotations.Expr<'T> -> 'T
/// Special prefix operator for splicing untyped expressions into quotation holes.
val ( ~%% ) : expression:Quotations.Expr -> 'T
/// An active pattern to force the execution of values of type Lazy<_>.
val (|Lazy|) : input:Lazy<'T> -> 'T
/// Builds a query using query syntax and operators.
val query : Linq.QueryBuilder

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle uninstantiated type parameters' failed: System.Exception : Type checking results in errors: [|C:\Temp.fsi (22,49)-(22,51) parse error Unexpected symbol '->'. Expected incomplete structured construct at or before this point or other token.;
  C:\Temp.fsi (22,5)-(22,8) typecheck error Return values cannot have names|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(1492,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.handle uninstantiated type parameters()

Output signature: module File

val inline func : x: ^a when  ^a : (static member ( + ) :  ^a *  ^a ->  ^b) ->  ^b when  ^a : (static member ( + ) :  ^a *  ^a ->  ^b) when ^a : (static member ( + ) :  ^a when  ^a : (static member ( + ) :  ^a *  ^a ->  ^b) *  ^a when  ^a : (static member ( + ) :  ^a *  ^a ->  ^b) ->  ^b when  ^a : (static member ( + ) :  ^a *  ^a ->  ^b))

Test 'FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.operator names are demangled' failed: System.Exception : Type checking results in errors: [|C:\Temp.fsi (3,77)-(3,79) parse error Unexpected symbol '->'. Expected incomplete structured construct at or before this point or other token.;
  C:\Temp.fsi (3,12)-(3,16) typecheck error Return values cannot have names|]
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(115,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos@115.Invoke(String message)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(116,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.generateDefinitionFromPos(pos caretPos, String src)
    D:\git\VisualFSharpPowerTools\tests\FSharpVSPowerTools.Core.Tests\GoToDefinitionTests.fs(1254,0): at FSharpVSPowerTools.Core.Tests.GoToDefinitionTests.operator names are demangled()

49 passed, 8 failed, 0 skipped, took 13,29 seconds (NUnit 2.6.4).

@vasily-kirichenko
Copy link
Contributor Author

Committed.

@dungpa
Copy link
Contributor

dungpa commented Oct 15, 2015

@dsyme We generated fsi files using FSharpType.Format function. Now the function also prints some extra member constraints that the compiler doesn't accept inside signature files. Is there any way for us to preserve the old behaviour? Thanks.

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

On it

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

Note this disables the max-memory trigger by default though it can be set on by an environment variable https://github.com/fsharp/FSharp.Compiler.Service/pull/444/files#diff-d3c6e872b60cb8a91665cdd9d5e5ca27R65

When I tried the new VSIX, memory still rose unbounded, although there was one point where it reduced very substantially. That's an interesting result in itself - even with the caching basically off (apart from one project) we are getting unbounded memory usage (this was on this solution: https://github.com/fsharp/fsharp/blob/master/src/fsharp.sln, making repreated one-character edits in TypeChecker.fs).

I really want to dig into why memory continues to grow for VFPT on this solution.

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

@dungpa
Copy link
Contributor

dungpa commented Oct 15, 2015

It sounds like a case of memory leaks to me. It would be great if we can get a snapshot of VS memory usage and investigate further.

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

Perhaps - it's only in these large-project scenarios that things seem to leak though, which seems odd. There are other kinds of leaks that can happen such as an ever-increasing number of requests in the FCS request queue. I'm in the process of instrumenting FCS to get better visibility of that

vasily-kirichenko added a commit that referenced this pull request Oct 16, 2015
@vasily-kirichenko vasily-kirichenko merged commit ed2d578 into fsprojects-archive:master Oct 16, 2015
@dungpa
Copy link
Contributor

dungpa commented Oct 16, 2015

@vasily-kirichenko Don't we have to set mFSharp_maxMB environment variable in order to enable max memory checks https://github.com/fsharp/FSharp.Compiler.Service/pull/444/files#diff-d3c6e872b60cb8a91665cdd9d5e5ca27R65?

@dsyme
Copy link
Contributor

dsyme commented Oct 16, 2015

@dungpa You can set the MaxMemory property on FSharpChecker. However, I'm not yet convinced that the max-memory trigger does anything sufficiently useful.

@dsyme
Copy link
Contributor

dsyme commented Oct 16, 2015

FCS 1.4.1 is now available with updates to the reactor and caching: fsharp/fsharp-compiler-docs#445

@vasily-kirichenko vasily-kirichenko deleted the update-fcs-to-1.4.0.8 branch November 1, 2015 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants